home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Tape Archive
(archive/tar).
You can browse this item here: ksmbfs-0
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Tape Archive (archive/tar)
| magic
| Supported |
100%
| file
| POSIX tar archive
| default
| |
99%
| file
| POSIX tar archive, directory ksmbfs, mode 000755 , uid 001473 , gid 000017 , size 00000000000 , seconds 06062771562, user lendecke, group users, devmaj 000001 , devmin 1540447
| default
| |
98%
| file
| data
| default
| |
41%
| TrID
| Sybase iAnywhere database files
| default (weak)
| |
36%
| TrID
| TAR - Tape ARchive (POSIX)
| default
| |
21%
| TrID
| TAR - Tape ARchive (directory)
| default
| |
100%
| siegfried
| x-fmt/265 Tape Archive Format
| default
| |
100%
| lsar
| Tar
| default
| |
100%
| gt2
| TAR Archiv gefunden (Auflistung ist deaktiviert)
| default
| |
100%
| disktype
| POSIX tar archive
| default
| |
100%
| detectItEasy
| Archive: tar
| default
| |
100%
| binwalkID
| POSIX tar archive
| default
| |
100%
| xdgMime
| application/x-tar
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 6b 73 6d 62 66 73 00 00 | 00 00 00 00 00 00 00 00 |ksmbfs..|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 30 30 30 37 | 35 35 20 00 30 30 31 34 |....0007|55 .0014|
|00000070| 37 33 20 00 30 30 30 30 | 31 37 20 00 30 30 30 30 |73 .0000|17 .0000|
|00000080| 30 30 30 30 30 30 30 20 | 30 36 30 36 32 37 37 31 |0000000 |06062771|
|00000090| 35 36 32 20 30 31 33 33 | 36 33 20 00 35 00 00 00 |562 0133|63 .5...|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 75 73 74 61 72 00 30 | 30 6c 65 6e 64 65 63 6b |.ustar.0|0lendeck|
|00000110| 65 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |e.......|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 30 30 30 30 30 31 20 |........|.000001 |
|00000150| 00 31 35 34 30 34 34 37 | 20 00 00 00 00 00 00 00 |.1540447| .......|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 6b 73 6d 62 66 73 2f 4d | 61 6b 65 66 69 6c 65 00 |ksmbfs/M|akefile.|
|00000210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 30 30 30 36 | 34 34 20 00 30 30 31 34 |....0006|44 .0014|
|00000270| 37 33 20 00 30 30 30 30 | 31 37 20 00 30 30 30 30 |73 .0000|17 .0000|
|00000280| 30 30 30 32 32 34 31 20 | 30 36 30 36 32 37 36 37 |0002241 |06062767|
|00000290| 35 30 34 20 30 31 35 30 | 37 33 20 00 30 00 00 00 |504 0150|73 .0...|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 75 73 74 61 72 00 30 | 30 6c 65 6e 64 65 63 6b |.ustar.0|0lendeck|
|00000310| 65 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |e.......|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 30 30 30 30 30 31 20 |........|.000001 |
|00000350| 00 31 35 34 30 30 32 36 | 20 00 00 00 00 00 00 00 |.1540026| .......|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 23 0a 23 20 4d 61 6b 65 | 66 69 6c 65 20 66 6f 72 |#.# Make|file for|
|00000410| 20 74 68 65 20 6c 69 6e | 75 78 20 73 6d 62 2d 66 | the lin|ux smb-f|
|00000420| 69 6c 65 73 79 73 74 65 | 6d 20 72 6f 75 74 69 6e |ilesyste|m routin|
|00000430| 65 73 2e 0a 23 0a 0a 54 | 4f 50 44 49 52 20 3d 20 |es..#..T|OPDIR = |
|00000440| 24 28 73 68 65 6c 6c 20 | 70 77 64 29 0a 0a 42 49 |$(shell |pwd)..BI|
|00000450| 4e 44 49 52 20 3d 20 24 | 28 54 4f 50 44 49 52 29 |NDIR = $|(TOPDIR)|
|00000460| 2f 62 69 6e 0a 53 55 42 | 44 49 52 53 20 3d 20 75 |/bin.SUB|DIRS = u|
|00000470| 74 69 6c 0a 0a 0a 23 0a | 23 20 54 68 65 20 66 6f |til...#.|# The fo|
|00000480| 6c 6c 6f 77 69 6e 67 20 | 32 20 6c 69 6e 65 73 20 |llowing |2 lines |
|00000490| 61 72 65 20 66 6f 72 20 | 74 68 6f 73 65 20 77 68 |are for |those wh|
|000004a0| 6f 20 75 73 65 20 4b 65 | 72 6e 65 6c 20 76 65 72 |o use Ke|rnel ver|
|000004b0| 73 69 6f 6e 20 31 2e 32 | 2e 78 2e 0a 23 20 49 66 |sion 1.2|.x..# If|
|000004c0| 20 79 6f 75 20 68 61 76 | 65 20 61 20 6b 65 72 6e | you hav|e a kern|
|000004d0| 65 6c 20 6c 61 74 65 72 | 20 74 68 61 6e 20 31 2e |el later| than 1.|
|000004e0| 33 2e 37 2c 20 70 6c 65 | 61 73 65 20 63 6f 6d 6d |3.7, ple|ase comm|
|000004f0| 65 6e 74 20 6f 75 74 20 | 74 68 65 0a 23 20 74 68 |ent out |the.# th|
|00000500| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 6c 69 6e 65 |e follow|ing line|
|00000510| 73 2e 20 59 6f 75 20 68 | 61 76 65 20 74 6f 20 72 |s. You h|ave to r|
|00000520| 65 63 6f 6d 70 69 6c 65 | 20 79 6f 75 72 20 6b 65 |ecompile| your ke|
|00000530| 72 6e 65 6c 0a 23 20 61 | 6e 64 20 73 61 79 20 27 |rnel.# a|nd say '|
|00000540| 79 27 20 77 68 65 6e 20 | 27 6d 61 6b 65 20 63 6f |y' when |'make co|
|00000550| 6e 66 69 67 27 20 61 73 | 6b 73 20 79 6f 75 20 66 |nfig' as|ks you f|
|00000560| 6f 72 20 73 6d 62 66 73 | 2e 0a 23 0a 53 55 42 44 |or smbfs|..#.SUBD|
|00000570| 49 52 53 20 3d 20 75 74 | 69 6c 20 6b 65 72 6e 65 |IRS = ut|il kerne|
|00000580| 6c 2f 73 72 63 0a 49 4e | 43 4c 55 44 45 53 20 3d |l/src.IN|CLUDES =|
|00000590| 20 2d 49 24 28 54 4f 50 | 44 49 52 29 2f 6b 65 72 | -I$(TOP|DIR)/ker|
|000005a0| 6e 65 6c 0a 0a 0a 0a 65 | 78 70 6f 72 74 20 49 4e |nel....e|xport IN|
|000005b0| 43 4c 55 44 45 53 20 42 | 49 4e 44 49 52 0a 0a 61 |CLUDES B|INDIR..a|
|000005c0| 6c 6c 3a 0a 09 66 6f 72 | 20 69 20 69 6e 20 24 28 |ll:..for| i in $(|
|000005d0| 53 55 42 44 49 52 53 29 | 3b 20 64 6f 20 6d 61 6b |SUBDIRS)|; do mak|
|000005e0| 65 20 2d 43 20 24 24 69 | 3b 20 64 6f 6e 65 0a 0a |e -C $$i|; done..|
|000005f0| 64 65 70 3a 0a 09 66 6f | 72 20 69 20 69 6e 20 24 |dep:..fo|r i in $|
|00000600| 28 53 55 42 44 49 52 53 | 29 3b 20 64 6f 09 6d 61 |(SUBDIRS|); do.ma|
|00000610| 6b 65 20 2d 43 20 24 24 | 69 20 64 65 70 3b 20 64 |ke -C $$|i dep; d|
|00000620| 6f 6e 65 0a 0a 63 6c 65 | 61 6e 3a 0a 09 72 6d 20 |one..cle|an:..rm |
|00000630| 2d 66 20 60 66 69 6e 64 | 20 2e 20 2d 74 79 70 65 |-f `find| . -type|
|00000640| 20 66 20 2d 6e 61 6d 65 | 20 27 2a 2e 6f 27 20 2d | f -name| '*.o' -|
|00000650| 70 72 69 6e 74 60 0a 09 | 72 6d 20 2d 66 20 60 66 |print`..|rm -f `f|
|00000660| 69 6e 64 20 2e 20 2d 74 | 79 70 65 20 66 20 2d 6e |ind . -t|ype f -n|
|00000670| 61 6d 65 20 27 2a 7e 27 | 20 2d 70 72 69 6e 74 60 |ame '*~'| -print`|
|00000680| 0a 09 72 6d 20 2d 66 20 | 60 66 69 6e 64 20 2e 20 |..rm -f |`find . |
|00000690| 2d 74 79 70 65 20 66 20 | 2d 6e 61 6d 65 20 27 2e |-type f |-name '.|
|000006a0| 64 65 70 65 6e 64 27 20 | 2d 70 72 69 6e 74 60 0a |depend' |-print`.|
|000006b0| 09 72 6d 20 2d 66 20 60 | 66 69 6e 64 20 2e 20 2d |.rm -f `|find . -|
|000006c0| 74 79 70 65 20 66 20 2d | 6e 61 6d 65 20 27 2a 2e |type f -|name '*.|
|000006d0| 6f 75 74 27 20 2d 70 72 | 69 6e 74 60 0a 09 66 6f |out' -pr|int`..fo|
|000006e0| 72 20 69 20 69 6e 20 24 | 28 53 55 42 44 49 52 53 |r i in $|(SUBDIRS|
|000006f0| 29 3b 20 64 6f 09 6d 61 | 6b 65 20 2d 43 20 24 24 |); do.ma|ke -C $$|
|00000700| 69 20 63 6c 65 61 6e 3b | 20 64 6f 6e 65 0a 0a 72 |i clean;| done..r|
|00000710| 65 61 6c 63 6c 65 61 6e | 3a 20 63 6c 65 61 6e 0a |ealclean|: clean.|
|00000720| 09 72 6d 20 2d 66 72 20 | 62 69 6e 2f 2a 20 6b 73 |.rm -fr |bin/* ks|
|00000730| 6d 62 66 73 2e 74 67 7a | 0a 09 6d 61 6b 65 20 2d |mbfs.tgz|..make -|
|00000740| 43 20 75 74 69 6c 20 72 | 65 61 6c 63 6c 65 61 6e |C util r|ealclean|
|00000750| 0a 0a 6d 6f 64 75 6c 65 | 73 3a 20 73 6d 62 66 73 |..module|s: smbfs|
|00000760| 2e 6f 0a 0a 53 52 43 50 | 41 54 48 3d 24 28 73 68 |.o..SRCP|ATH=$(sh|
|00000770| 65 6c 6c 20 70 77 64 29 | 0a 53 52 43 44 49 52 3d |ell pwd)|.SRCDIR=|
|00000780| 24 28 73 68 65 6c 6c 20 | 62 61 73 65 6e 61 6d 65 |$(shell |basename|
|00000790| 20 24 28 53 52 43 50 41 | 54 48 29 29 0a 44 49 53 | $(SRCPA|TH)).DIS|
|000007a0| 54 46 49 4c 45 3d 24 28 | 53 52 43 44 49 52 29 2e |TFILE=$(|SRCDIR).|
|000007b0| 74 67 7a 0a 0a 64 69 73 | 74 3a 20 72 65 61 6c 63 |tgz..dis|t: realc|
|000007c0| 6c 65 61 6e 0a 09 28 63 | 64 20 2e 2e 3b 20 5c 0a |lean..(c|d ..; \.|
|000007d0| 20 20 20 20 20 20 20 20 | 20 74 61 72 20 63 76 66 | | tar cvf|
|000007e0| 20 2d 20 24 28 53 52 43 | 44 49 52 29 20 7c 20 5c | - $(SRC|DIR) | \|
|000007f0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 67 7a 69 |. | gzi|
|00000800| 70 20 2d 39 20 3e 20 24 | 28 44 49 53 54 46 49 4c |p -9 > $|(DISTFIL|
|00000810| 45 29 3b 20 5c 0a 20 20 | 20 20 20 20 20 20 20 6d |E); \. | m|
|00000820| 76 20 24 28 44 49 53 54 | 46 49 4c 45 29 20 24 28 |v $(DIST|FILE) $(|
|00000830| 53 52 43 44 49 52 29 29 | 0a 0a 23 0a 23 20 69 6e |SRCDIR))|..#.# in|
|00000840| 63 6c 75 64 65 20 61 20 | 64 65 70 65 6e 64 65 6e |clude a |dependen|
|00000850| 63 79 20 66 69 6c 65 20 | 69 66 20 6f 6e 65 20 65 |cy file |if one e|
|00000860| 78 69 73 74 73 0a 23 0a | 69 66 65 71 20 28 2e 64 |xists.#.|ifeq (.d|
|00000870| 65 70 65 6e 64 2c 24 28 | 77 69 6c 64 63 61 72 64 |epend,$(|wildcard|
|00000880| 20 2e 64 65 70 65 6e 64 | 29 29 0a 69 6e 63 6c 75 | .depend|)).inclu|
|00000890| 64 65 20 2e 64 65 70 65 | 6e 64 0a 65 6e 64 69 66 |de .depe|nd.endif|
|000008a0| 0a 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a00| 6b 73 6d 62 66 73 2f 6d | 61 6e 00 00 00 00 00 00 |ksmbfs/m|an......|
|00000a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a60| 00 00 00 00 30 30 30 37 | 35 35 20 00 30 30 31 34 |....0007|55 .0014|
|00000a70| 37 33 20 00 30 30 30 30 | 31 37 20 00 30 30 30 30 |73 .0000|17 .0000|
|00000a80| 30 30 30 30 30 30 30 20 | 30 36 30 36 32 37 35 33 |0000000 |06062753|
|00000a90| 34 30 35 20 30 31 34 31 | 32 37 20 00 35 00 00 00 |405 0141|27 .5...|
|00000aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b00| 00 75 73 74 61 72 00 30 | 30 6c 65 6e 64 65 63 6b |.ustar.0|0lendeck|
|00000b10| 65 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |e.......|........|
|00000b20| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00000b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b40| 00 00 00 00 00 00 00 00 | 00 30 30 30 30 30 31 20 |........|.000001 |
|00000b50| 00 32 31 37 33 34 30 35 | 20 00 00 00 00 00 00 00 |.2173405| .......|
|00000b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c00| 6b 73 6d 62 66 73 2f 6d | 61 6e 2f 73 6d 62 6d 6f |ksmbfs/m|an/smbmo|
|00000c10| 75 6e 74 2e 38 00 00 00 | 00 00 00 00 00 00 00 00 |unt.8...|........|
|00000c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c60| 00 00 00 00 30 30 30 34 | 34 34 20 00 30 30 31 34 |....0004|44 .0014|
|00000c70| 37 33 20 00 30 30 30 30 | 31 37 20 00 30 30 30 30 |73 .0000|17 .0000|
|00000c80| 30 30 32 30 32 35 35 20 | 30 36 30 36 32 37 35 33 |0020255 |06062753|
|00000c90| 33 30 30 20 30 31 36 31 | 33 32 20 00 30 00 00 00 |300 0161|32 .0...|
|00000ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d00| 00 75 73 74 61 72 00 30 | 30 6c 65 6e 64 65 63 6b |.ustar.0|0lendeck|
|00000d10| 65 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |e.......|........|
|00000d20| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00000d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d40| 00 00 00 00 00 00 00 00 | 00 30 30 30 30 30 31 20 |........|.000001 |
|00000d50| 00 32 31 37 34 33 30 30 | 20 00 00 00 00 00 00 00 |.2174300| .......|
|00000d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e00| 2e 54 48 20 53 4d 42 4d | 4f 55 4e 54 20 38 20 31 |.TH SMBM|OUNT 8 1|
|00000e10| 36 2f 34 2f 31 39 39 35 | 20 73 6d 62 6d 6f 75 6e |6/4/1995| smbmoun|
|00000e20| 74 20 73 6d 62 6d 6f 75 | 6e 74 0a 2e 53 48 20 4e |t smbmou|nt..SH N|
|00000e30| 41 4d 45 0a 73 6d 62 6d | 6f 75 6e 74 20 5c 2d 20 |AME.smbm|ount \- |
|00000e40| 6d 6f 75 6e 74 20 70 72 | 6f 67 72 61 6d 20 66 6f |mount pr|ogram fo|
|00000e50| 72 20 73 6d 62 66 73 0a | 2e 53 48 20 53 59 4e 4f |r smbfs.|.SH SYNO|
|00000e60| 50 53 49 53 0a 2e 42 20 | 73 6d 62 6d 6f 75 6e 74 |PSIS..B |smbmount|
|00000e70| 0a 2e 42 20 73 65 72 76 | 69 63 65 6e 61 6d 65 20 |..B serv|icename |
|00000e80| 6d 6f 75 6e 74 2d 70 6f | 69 6e 74 0a 5b 0a 2e 42 |mount-po|int.[..B|
|00000e90| 20 2d 68 0a 5d 0a 5b 0a | 2e 42 20 2d 43 0a 5d 0a | -h.].[.|.B -C.].|
|00000ea0| 5b 0a 2e 42 20 2d 6e 0a | 2e 49 0a 5d 20 5b 0a 2e |[..B -n.|.I.] [..|
|00000eb0| 42 20 2d 50 0a 2e 49 20 | 70 61 73 73 77 6f 72 64 |B -P..I |password|
|00000ec0| 0a 5d 20 5b 0a 2e 42 20 | 2d 73 0a 2e 49 20 73 65 |.] [..B |-s..I se|
|00000ed0| 72 76 65 72 20 6e 61 6d | 65 0a 5d 20 5b 0a 2e 42 |rver nam|e.] [..B|
|00000ee0| 20 2d 63 0a 2e 49 20 63 | 6c 69 65 6e 74 20 6e 61 | -c..I c|lient na|
|00000ef0| 6d 65 0a 5d 20 5b 0a 2e | 42 20 2d 55 0a 2e 49 20 |me.] [..|B -U..I |
|00000f00| 75 73 65 72 20 6e 61 6d | 65 0a 5d 20 5b 0a 2e 42 |user nam|e.] [..B|
|00000f10| 20 2d 75 0a 2e 49 20 75 | 69 64 0a 5d 20 5b 0a 2e | -u..I u|id.] [..|
|00000f20| 42 20 2d 67 0a 2e 49 20 | 67 69 64 0a 5d 20 5b 0a |B -g..I |gid.] [.|
|00000f30| 2e 42 20 2d 66 0a 2e 49 | 20 66 69 6c 65 20 6d 6f |.B -f..I| file mo|
|00000f40| 64 65 0a 5d 20 5b 0a 2e | 42 20 2d 64 0a 2e 49 20 |de.] [..|B -d..I |
|00000f50| 64 69 72 20 6d 6f 64 65 | 0a 5d 20 5b 0a 2e 42 20 |dir mode|.] [..B |
|00000f60| 2d 6d 0a 2e 49 20 6d 61 | 78 20 78 6d 69 74 0a 5d |-m..I ma|x xmit.]|
|00000f70| 20 5b 0a 2e 42 20 2d 70 | 20 0a 2e 49 20 70 6f 72 | [..B -p| ..I por|
|00000f80| 74 0a 5d 20 0a 0a 2e 53 | 48 20 44 45 53 43 52 49 |t.] ...S|H DESCRI|
|00000f90| 50 54 49 4f 4e 0a 54 68 | 69 73 20 70 72 6f 67 72 |PTION.Th|is progr|
|00000fa0| 61 6d 20 69 73 20 61 6e | 20 69 6e 74 65 72 66 61 |am is an| interfa|
|00000fb0| 63 65 20 74 6f 20 74 68 | 65 20 53 4d 42 20 66 69 |ce to th|e SMB fi|
|00000fc0| 6c 65 73 79 73 74 65 6d | 2e 0a 0a 2e 42 20 73 6d |lesystem|....B sm|
|00000fd0| 62 66 73 0a 69 73 20 61 | 20 66 69 6c 65 73 79 73 |bfs.is a| filesys|
|00000fe0| 74 65 6d 20 77 68 69 63 | 68 20 75 6e 64 65 72 73 |tem whic|h unders|
|00000ff0| 74 61 6e 64 73 20 74 68 | 65 20 53 4d 42 20 70 72 |tands th|e SMB pr|
|00001000| 6f 74 6f 63 6f 6c 2e 20 | 54 68 69 73 20 69 73 20 |otocol. |This is |
|00001010| 74 68 65 0a 70 72 6f 74 | 6f 63 6f 6c 20 57 69 6e |the.prot|ocol Win|
|00001020| 64 6f 77 73 20 66 6f 72 | 20 57 6f 72 6b 67 72 6f |dows for| Workgro|
|00001030| 75 70 73 2c 20 57 69 6e | 64 6f 77 73 20 4e 54 20 |ups, Win|dows NT |
|00001040| 6f 72 20 4c 61 6e 20 4d | 61 6e 61 67 65 72 20 75 |or Lan M|anager u|
|00001050| 73 65 20 74 6f 20 74 61 | 6c 6b 0a 74 6f 20 65 61 |se to ta|lk.to ea|
|00001060| 63 68 20 6f 74 68 65 72 | 2e 20 49 74 20 77 61 73 |ch other|. It was|
|00001070| 20 69 6e 73 70 69 72 65 | 64 20 62 79 0a 2e 42 20 | inspire|d by..B |
|00001080| 73 61 6d 62 61 2c 0a 74 | 68 65 20 70 72 6f 67 72 |samba,.t|he progr|
|00001090| 61 6d 20 62 79 20 41 6e | 64 72 65 77 20 54 72 69 |am by An|drew Tri|
|000010a0| 64 67 65 6c 6c 20 74 68 | 61 74 20 74 75 72 6e 73 |dgell th|at turns|
|000010b0| 20 61 6e 79 20 75 6e 69 | 78 20 73 69 74 65 20 69 | any uni|x site i|
|000010c0| 6e 74 6f 20 61 20 66 69 | 6c 65 0a 73 65 72 76 65 |nto a fi|le.serve|
|000010d0| 72 20 66 6f 72 20 44 4f | 53 20 6f 72 20 57 69 6e |r for DO|S or Win|
|000010e0| 64 6f 77 73 20 63 6c 69 | 65 6e 74 73 2e 0a 53 65 |dows cli|ents..Se|
|000010f0| 65 20 66 74 70 3a 2f 2f | 6e 69 6d 62 75 73 2e 61 |e ftp://|nimbus.a|
|00001100| 6e 75 2e 65 64 75 2e 61 | 75 2f 70 75 62 2f 74 72 |nu.edu.a|u/pub/tr|
|00001110| 69 64 67 65 2f 73 61 6d | 62 61 2f 20 66 6f 72 20 |idge/sam|ba/ for |
|00001120| 74 68 69 73 20 69 6e 74 | 65 72 65 73 74 69 6e 67 |this int|eresting|
|00001130| 0a 70 72 6f 67 72 61 6d | 20 73 75 69 74 65 20 61 |.program| suite a|
|00001140| 6e 64 20 6c 6f 74 73 20 | 6f 66 20 6d 6f 72 65 20 |nd lots |of more |
|00001150| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 6f 6e 20 53 |informat|ion on S|
|00001160| 4d 42 20 61 6e 64 20 4e | 65 74 42 49 4f 53 20 6f |MB and N|etBIOS o|
|00001170| 76 65 72 0a 54 43 50 2f | 49 50 2e 20 54 68 65 72 |ver.TCP/|IP. Ther|
|00001180| 65 20 79 6f 75 20 61 6c | 73 6f 20 66 69 6e 64 20 |e you al|so find |
|00001190| 65 78 70 6c 61 6e 61 74 | 69 6f 6e 20 66 6f 72 20 |explanat|ion for |
|000011a0| 63 6f 6e 63 65 70 73 20 | 6c 69 6b 65 20 6e 65 74 |conceps |like net|
|000011b0| 62 69 6f 73 20 6e 61 6d | 65 0a 6f 72 20 73 68 61 |bios nam|e.or sha|
|000011c0| 72 65 2e 0a 0a 2e 53 48 | 20 4f 50 54 49 4f 4e 53 |re....SH| OPTIONS|
|000011d0| 0a 2e 42 20 73 65 72 76 | 69 63 65 6e 61 6d 65 0a |..B serv|icename.|
|000011e0| 2e 52 53 20 33 0a 2e 42 | 20 73 65 72 76 69 63 65 |.RS 3..B| service|
|000011f0| 6e 61 6d 65 0a 69 73 20 | 74 68 65 20 6e 61 6d 65 |name.is |the name|
|00001200| 20 6f 66 20 74 68 65 20 | 73 65 72 76 69 63 65 20 | of the |service |
|00001210| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 75 73 65 20 |you want| to use |
|00001220| 6f 6e 20 74 68 65 20 73 | 65 72 76 65 72 2e 20 49 |on the s|erver. I|
|00001230| 74 20 0a 74 61 6b 65 73 | 20 74 68 65 20 66 6f 72 |t .takes| the for|
|00001240| 6d 0a 2e 42 20 22 2f 2f | 73 65 72 76 65 72 2f 73 |m..B "//|server/s|
|00001250| 65 72 76 69 63 65 2f 72 | 6f 6f 74 64 69 72 22 0a |ervice/r|ootdir".|
|00001260| 77 68 65 72 65 0a 2e 42 | 20 73 65 72 76 65 72 0a |where..B| server.|
|00001270| 69 73 20 74 68 65 20 6e | 61 6d 65 20 6f 66 20 74 |is the n|ame of t|
|00001280| 68 65 20 4c 61 6e 20 4d | 61 6e 61 67 65 72 20 73 |he Lan M|anager s|
|00001290| 65 72 76 65 72 20 6f 66 | 66 65 72 69 6e 67 20 74 |erver of|fering t|
|000012a0| 68 65 20 64 65 73 69 72 | 65 64 20 73 65 72 76 69 |he desir|ed servi|
|000012b0| 63 65 20 61 6e 64 0a 2e | 42 20 73 65 72 76 69 63 |ce and..|B servic|
|000012c0| 65 0a 69 73 20 74 68 65 | 20 6e 61 6d 65 20 6f 66 |e.is the| name of|
|000012d0| 20 74 68 65 20 73 65 72 | 76 69 63 65 20 6f 66 66 | the ser|vice off|
|000012e0| 65 72 65 64 2e 20 0a 2e | 42 20 72 6f 6f 74 64 69 |ered. ..|B rootdi|
|000012f0| 72 0a 69 73 20 61 20 64 | 69 72 65 63 74 6f 72 79 |r.is a d|irectory|
|00001300| 20 62 65 6c 6f 77 20 74 | 68 65 20 6f 66 66 65 72 | below t|he offer|
|00001310| 65 64 20 73 65 72 76 69 | 63 65 2e 20 54 68 69 73 |ed servi|ce. This|
|00001320| 20 63 61 6e 20 62 65 20 | 63 6f 6e 76 65 6e 69 65 | can be |convenie|
|00001330| 6e 74 20 77 68 65 6e 0a | 63 6f 6d 70 6c 65 74 65 |nt when.|complete|
|00001340| 20 64 69 73 6b 73 20 61 | 72 65 20 65 78 70 6f 72 | disks a|re expor|
|00001350| 74 65 64 20 62 79 20 61 | 20 73 65 72 76 65 72 2c |ted by a| server,|
|00001360| 20 62 75 74 20 6f 6e 6c | 79 20 61 20 73 6d 61 6c | but onl|y a smal|
|00001370| 6c 20 70 61 72 74 20 6f | 66 20 74 68 65 0a 68 69 |l part o|f the.hi|
|00001380| 65 72 61 72 63 68 79 20 | 73 68 6f 75 6c 64 20 62 |erarchy |should b|
|00001390| 65 20 61 76 61 69 6c 61 | 62 6c 65 20 66 6f 72 20 |e availa|ble for |
|000013a0| 74 68 65 20 63 6c 69 65 | 6e 74 2e 0a 54 68 75 73 |the clie|nt..Thus|
|000013b0| 20 74 6f 20 63 6f 6e 6e | 65 63 74 20 74 6f 20 74 | to conn|ect to t|
|000013c0| 68 65 20 64 69 72 65 63 | 74 6f 72 79 20 22 75 74 |he direc|tory "ut|
|000013d0| 69 6c 22 20 62 65 6c 6f | 77 20 74 68 65 20 73 65 |il" belo|w the se|
|000013e0| 72 76 69 63 65 20 22 63 | 22 20 0a 6f 6e 20 74 68 |rvice "c|" .on th|
|000013f0| 65 20 4c 61 6e 20 4d 61 | 6e 61 67 65 72 20 73 65 |e Lan Ma|nager se|
|00001400| 72 76 65 72 20 22 77 66 | 77 22 2c 20 79 6f 75 20 |rver "wf|w", you |
|00001410| 77 6f 75 6c 64 20 75 73 | 65 20 74 68 65 20 73 65 |would us|e the se|
|00001420| 72 76 69 63 65 6e 61 6d | 65 0a 0a 2e 52 53 20 31 |rvicenam|e...RS 1|
|00001430| 30 0a 2e 42 20 22 2f 2f | 77 66 77 2f 63 2f 75 74 |0..B "//|wfw/c/ut|
|00001440| 69 6c 22 0a 2e 52 45 0a | 0a 4e 6f 74 65 20 74 68 |il"..RE.|.Note th|
|00001450| 61 74 20 74 68 65 20 6e | 6f 74 61 74 69 6f 6e 20 |at the n|otation |
|00001460| 69 73 20 64 69 66 66 65 | 72 65 6e 74 20 66 72 6f |is diffe|rent fro|
|00001470| 6d 20 74 68 65 20 44 4f | 53 20 63 6f 6e 76 65 6e |m the DO|S conven|
|00001480| 74 69 6f 6e 73 2c 20 77 | 68 65 72 65 0a 74 68 65 |tions, w|here.the|
|00001490| 20 73 61 6d 65 20 73 65 | 72 76 69 63 65 20 77 6f | same se|rvice wo|
|000014a0| 75 6c 64 20 62 65 20 67 | 69 76 65 6e 20 61 73 20 |uld be g|iven as |
|000014b0| 5c 5c 5c 5c 77 66 77 5c | 5c 63 5c 5c 75 74 69 6c |\\\\wfw\|\c\\util|
|000014c0| 2e 20 54 68 69 73 20 77 | 61 73 20 64 6f 6e 65 20 |. This w|as done |
|000014d0| 74 6f 0a 67 65 74 20 72 | 69 64 20 6f 66 20 64 69 |to.get r|id of di|
|000014e0| 66 66 69 63 75 6c 74 69 | 65 73 20 77 69 74 68 20 |fficulti|es with |
|000014f0| 74 68 65 20 73 68 65 6c | 6c 20 75 73 69 6e 67 20 |the shel|l using |
|00001500| 5c 5c 20 61 73 20 61 6e | 20 65 73 63 61 70 65 0a |\\ as an| escape.|
|00001510| 63 68 61 72 61 63 74 65 | 72 2e 0a 0a 54 6f 20 6d |characte|r...To m|
|00001520| 61 6b 65 20 73 6d 62 6d | 6f 75 6e 74 20 63 6f 6d |ake smbm|ount com|
|00001530| 70 61 74 69 62 6c 65 20 | 77 69 74 68 20 74 68 65 |patible |with the|
|00001540| 20 61 75 74 6f 6d 6f 75 | 6e 74 65 72 2c 20 6f 6e | automou|nter, on|
|00001550| 6c 79 20 6f 6e 65 20 6c | 65 61 64 69 6e 67 20 27 |ly one l|eading '|
|00001560| 2f 27 0a 69 73 20 72 65 | 71 75 69 72 65 64 2c 20 |/'.is re|quired, |
|00001570| 61 6c 74 68 6f 75 67 68 | 20 61 6e 79 20 6e 75 6d |although| any num|
|00001580| 62 65 72 20 6f 66 20 27 | 2f 27 73 20 69 73 20 61 |ber of '|/'s is a|
|00001590| 63 63 65 70 74 65 64 2e | 0a 0a 43 75 72 72 65 6e |ccepted.|..Curren|
|000015a0| 74 6c 79 20 73 6d 62 6d | 6f 75 6e 74 20 75 73 65 |tly smbm|ount use|
|000015b0| 73 20 67 65 74 68 6f 73 | 74 62 79 6e 61 6d 65 28 |s gethos|tbyname(|
|000015c0| 29 20 74 6f 20 66 69 6e | 64 20 74 68 65 20 49 50 |) to fin|d the IP|
|000015d0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 74 68 65 0a 64 | number |of the.d|
|000015e0| 65 73 69 72 65 64 20 68 | 6f 73 74 2e 20 49 74 20 |esired h|ost. It |
|000015f0| 69 73 20 74 68 75 73 20 | 6e 6f 74 20 72 65 61 6c |is thus |not real|
|00001600| 6c 79 20 63 6f 6d 70 61 | 74 69 62 6c 65 20 77 69 |ly compa|tible wi|
|00001610| 74 68 20 4c 61 6e 20 4d | 61 6e 61 67 65 72 0a 63 |th Lan M|anager.c|
|00001620| 6f 6e 76 65 6e 74 69 6f | 6e 73 2c 20 77 68 65 72 |onventio|ns, wher|
|00001630| 65 20 74 68 65 20 6e 65 | 74 62 69 6f 73 20 6e 61 |e the ne|tbios na|
|00001640| 6d 65 20 6f 66 20 74 68 | 65 20 73 65 72 76 65 72 |me of th|e server|
|00001650| 20 69 73 20 6e 6f 74 20 | 6e 65 63 65 73 73 61 72 | is not |necessar|
|00001660| 69 6c 79 0a 74 68 65 20 | 73 61 6d 65 20 61 73 20 |ily.the |same as |
|00001670| 74 68 65 20 68 6f 73 74 | 6e 61 6d 65 2e 20 49 6e |the host|name. In|
|00001680| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 73 20 77 68 | environ|ments wh|
|00001690| 69 63 68 20 65 6e 66 6f | 72 63 65 20 61 20 6e 65 |ich enfo|rce a ne|
|000016a0| 74 62 69 6f 73 20 6e 61 | 6d 65 0a 74 68 61 74 27 |tbios na|me.that'|
|000016b0| 73 20 64 69 66 66 65 72 | 65 6e 74 20 74 68 61 6e |s differ|ent than|
|000016c0| 20 74 68 65 20 68 6f 73 | 74 6e 61 6d 65 2c 20 79 | the hos|tname, y|
|000016d0| 6f 75 20 73 68 6f 75 6c | 64 20 75 73 65 0a 2e 42 |ou shoul|d use..B|
|000016e0| 20 2d 73 0a 61 6e 64 0a | 2e 42 20 2d 63 0a 74 6f | -s.and.|.B -c.to|
|000016f0| 20 73 69 6d 75 6c 61 74 | 65 20 61 70 70 72 6f 70 | simulat|e approp|
|00001700| 72 69 61 74 65 20 62 65 | 68 61 76 69 6f 75 72 2e |riate be|haviour.|
|00001710| 0a 2e 52 45 0a 0a 2e 42 | 20 6d 6f 75 6e 74 2d 70 |..RE...B| mount-p|
|00001720| 6f 69 6e 74 0a 2e 52 53 | 20 33 0a 2e 42 20 6d 6f |oint..RS| 3..B mo|
|00001730| 75 6e 74 2d 70 6f 69 6e | 74 0a 69 73 20 74 68 65 |unt-poin|t.is the|
|00001740| 20 64 69 72 65 63 74 6f | 72 79 20 79 6f 75 20 77 | directo|ry you w|
|00001750| 61 6e 74 20 74 6f 20 6d | 6f 75 6e 74 20 74 68 65 |ant to m|ount the|
|00001760| 20 66 69 6c 65 73 79 73 | 74 65 6d 20 6f 76 65 72 | filesys|tem over|
|00001770| 2e 20 49 74 27 73 20 74 | 68 65 20 73 61 6d 65 0a |. It's t|he same.|
|00001780| 61 73 20 69 6e 20 74 68 | 65 20 6e 6f 72 6d 61 6c |as in th|e normal|
|00001790| 20 6d 6f 75 6e 74 20 63 | 6f 6d 6d 61 6e 64 2e 0a | mount c|ommand..|
|000017a0| 0a 49 66 20 74 68 65 20 | 72 65 61 6c 20 75 69 64 |.If the |real uid|
|000017b0| 20 6f 66 20 74 68 65 20 | 63 61 6c 6c 65 72 20 69 | of the |caller i|
|000017c0| 73 20 6e 6f 74 20 72 6f | 6f 74 2c 0a 2e 42 20 73 |s not ro|ot,..B s|
|000017d0| 6d 62 6d 6f 75 6e 74 0a | 63 68 65 63 6b 73 20 77 |mbmount.|checks w|
|000017e0| 68 65 74 68 65 72 20 74 | 68 65 20 75 73 65 72 20 |hether t|he user |
|000017f0| 69 73 20 61 6c 6c 6f 77 | 65 64 20 74 6f 20 6d 6f |is allow|ed to mo|
|00001800| 75 6e 74 20 61 20 66 69 | 6c 65 73 79 73 74 65 6d |unt a fi|lesystem|
|00001810| 20 6f 6e 20 74 68 65 0a | 6d 6f 75 6e 74 2d 70 6f | on the.|mount-po|
|00001820| 69 6e 74 2e 20 53 6f 20 | 69 74 20 73 68 6f 75 6c |int. So |it shoul|
|00001830| 64 20 62 65 20 73 61 66 | 65 20 74 6f 20 6d 61 6b |d be saf|e to mak|
|00001840| 65 20 73 6d 62 6d 6f 75 | 6e 74 20 73 65 74 75 69 |e smbmou|nt setui|
|00001850| 64 20 72 6f 6f 74 2e 20 | 49 6e 20 74 68 65 0a 66 |d root. |In the.f|
|00001860| 69 6c 65 73 79 73 74 65 | 6d 2c 20 74 68 65 20 72 |ilesyste|m, the r|
|00001870| 65 61 6c 20 75 69 64 20 | 6f 66 20 74 68 65 20 63 |eal uid |of the c|
|00001880| 61 6c 6c 65 72 20 69 73 | 20 73 74 6f 72 65 64 2c |aller is| stored,|
|00001890| 20 73 6f 20 74 68 61 74 | 0a 2e 42 20 73 6d 62 75 | so that|..B smbu|
|000018a0| 6d 6f 75 6e 74 0a 63 61 | 6e 20 63 68 65 63 6b 20 |mount.ca|n check |
|000018b0| 77 68 65 74 68 65 72 20 | 74 68 65 20 63 61 6c 6c |whether |the call|
|000018c0| 65 72 20 69 73 20 61 6c | 6c 6f 77 65 64 20 74 6f |er is al|lowed to|
|000018d0| 20 75 6e 6d 6f 75 6e 74 | 20 74 68 65 20 66 69 6c | unmount| the fil|
|000018e0| 65 73 79 73 74 65 6d 2e | 0a 2e 52 45 0a 0a 2e 42 |esystem.|..RE...B|
|000018f0| 20 2d 68 0a 2e 52 53 20 | 33 0a 2e 42 20 2d 68 0a | -h..RS |3..B -h.|
|00001900| 69 73 20 75 73 65 64 20 | 74 6f 20 70 72 69 6e 74 |is used |to print|
|00001910| 20 6f 75 74 20 61 20 73 | 68 6f 72 74 20 68 65 6c | out a s|hort hel|
|00001920| 70 20 74 65 78 74 2e 0a | 2e 52 45 0a 0a 2e 42 20 |p text..|.RE...B |
|00001930| 2d 43 0a 2e 52 53 20 33 | 0a 42 79 20 64 65 66 61 |-C..RS 3|.By defa|
|00001940| 75 6c 74 2c 20 70 61 73 | 73 77 6f 72 64 73 20 61 |ult, pas|swords a|
|00001950| 72 65 20 63 6f 6e 76 65 | 72 74 65 64 20 74 6f 20 |re conve|rted to |
|00001960| 75 70 70 65 72 63 61 73 | 65 20 62 65 66 6f 72 65 |uppercas|e before|
|00001970| 20 74 68 65 79 20 61 72 | 65 20 73 65 6e 74 0a 74 | they ar|e sent.t|
|00001980| 6f 20 74 68 65 20 73 65 | 72 76 65 72 2c 20 62 65 |o the se|rver, be|
|00001990| 63 61 75 73 65 20 6d 6f | 73 74 20 73 65 72 76 65 |cause mo|st serve|
|000019a0| 72 73 20 72 65 71 75 69 | 72 65 20 74 68 69 73 2e |rs requi|re this.|
|000019b0| 20 59 6f 75 20 63 61 6e | 20 74 75 72 6e 20 6f 66 | You can| turn of|
|000019c0| 66 0a 74 68 69 73 20 63 | 6f 6e 76 65 72 73 69 6f |f.this c|onversio|
|000019d0| 6e 20 62 79 0a 2e 42 20 | 2d 43 2e 0a 2e 52 45 0a |n by..B |-C...RE.|
|000019e0| 0a 2e 42 20 2d 6e 0a 2e | 52 53 20 33 0a 2e 42 20 |..B -n..|RS 3..B |
|000019f0| 2d 6e 0a 73 68 6f 75 6c | 64 20 62 65 20 67 69 76 |-n.shoul|d be giv|
|00001a00| 65 6e 20 74 6f 20 6d 6f | 75 6e 74 20 73 68 61 72 |en to mo|unt shar|
|00001a10| 65 73 20 77 68 69 63 68 | 20 64 6f 20 6e 6f 74 20 |es which| do not |
|00001a20| 72 65 71 75 69 72 65 20 | 61 20 70 61 73 73 77 6f |require |a passwo|
|00001a30| 72 64 20 74 6f 20 6c 6f | 67 20 69 6e 2e 0a 2e 52 |rd to lo|g in...R|
|00001a40| 45 0a 0a 2e 42 20 2d 50 | 0a 2e 49 20 70 61 73 73 |E...B -P|..I pass|
|00001a50| 77 6f 72 64 0a 2e 52 53 | 20 33 0a 59 6f 75 20 6d |word..RS| 3.You m|
|00001a60| 61 79 20 77 61 6e 74 20 | 74 6f 20 67 69 76 65 20 |ay want |to give |
|00001a70| 74 68 65 20 70 61 73 73 | 77 6f 72 64 20 72 65 71 |the pass|word req|
|00001a80| 75 69 72 65 64 20 62 79 | 20 74 68 65 20 73 65 72 |uired by| the ser|
|00001a90| 76 65 72 20 6f 6e 20 74 | 68 65 0a 63 6f 6d 6d 61 |ver on t|he.comma|
|00001aa0| 6e 64 20 6c 69 6e 65 2e | 20 59 6f 75 20 73 68 6f |nd line.| You sho|
|00001ab0| 75 6c 64 20 62 65 20 63 | 61 72 65 66 75 6c 20 74 |uld be c|areful t|
|00001ac0| 6f 20 75 73 65 20 70 61 | 73 73 77 6f 72 64 73 20 |o use pa|sswords |
|00001ad0| 69 6e 20 73 63 72 69 70 | 74 73 2e 0a 0a 49 66 20 |in scrip|ts...If |
|00001ae0| 6e 65 69 74 68 65 72 0a | 2e 42 20 2d 6e 0a 6e 6f |neither.|.B -n.no|
|00001af0| 72 0a 2e 42 20 2d 50 0a | 61 72 65 20 67 69 76 65 |r..B -P.|are give|
|00001b00| 6e 2c 20 73 6d 62 6d 6f | 75 6e 74 20 70 72 6f 6d |n, smbmo|unt prom|
|00001b10| 70 74 73 20 66 6f 72 20 | 61 20 70 61 73 73 77 6f |pts for |a passwo|
|00001b20| 72 64 2e 20 54 68 69 73 | 20 6d 61 6b 65 73 20 69 |rd. This| makes i|
|00001b30| 74 20 64 69 66 66 69 63 | 75 6c 74 20 74 6f 0a 75 |t diffic|ult to.u|
|00001b40| 73 65 20 69 6e 20 73 63 | 72 69 70 74 73 20 73 75 |se in sc|ripts su|
|00001b50| 63 68 20 61 73 20 2f 65 | 74 63 2f 72 63 2e 20 42 |ch as /e|tc/rc. B|
|00001b60| 75 74 20 74 68 61 74 27 | 73 20 6e 6f 74 20 73 6d |ut that'|s not sm|
|00001b70| 62 6d 6f 75 6e 74 27 73 | 20 66 61 75 6c 74 2c 20 |bmount's| fault, |
|00001b80| 62 75 74 20 61 0a 67 65 | 6e 65 72 61 6c 20 70 72 |but a.ge|neral pr|
|00001b90| 6f 62 6c 65 6d 20 77 69 | 74 68 20 74 68 65 20 4c |oblem wi|th the L|
|00001ba0| 61 6e 20 4d 61 6e 61 67 | 65 72 20 73 65 63 75 72 |an Manag|er secur|
|00001bb0| 69 74 79 20 6d 6f 64 65 | 6c 2e 20 49 66 20 61 6e |ity mode|l. If an|
|00001bc0| 79 62 6f 64 79 20 68 61 | 73 20 61 0a 73 61 74 69 |ybody ha|s a.sati|
|00001bd0| 73 66 79 69 6e 67 20 73 | 6f 6c 75 74 69 6f 6e 20 |sfying s|olution |
|00001be0| 74 6f 20 74 68 69 73 20 | 70 72 6f 62 6c 65 6d 2c |to this |problem,|
|00001bf0| 20 70 6c 65 61 73 65 20 | 74 65 6c 6c 20 6d 65 2e | please |tell me.|
|00001c00| 0a 2e 52 45 0a 0a 2e 42 | 20 2d 73 0a 2e 49 20 73 |..RE...B| -s..I s|
|00001c10| 65 72 76 65 72 20 6e 61 | 6d 65 0a 2e 52 53 20 33 |erver na|me..RS 3|
|00001c20| 0a 49 66 20 74 68 65 20 | 73 65 72 76 65 72 20 68 |.If the |server h|
|00001c30| 61 73 20 61 20 64 69 66 | 66 65 72 65 6e 74 20 6e |as a dif|ferent n|
|00001c40| 65 74 62 69 6f 73 20 6e | 61 6d 65 20 74 68 61 6e |etbios n|ame than|
|00001c50| 20 69 74 73 20 68 6f 73 | 74 6e 61 6d 65 2c 20 79 | its hos|tname, y|
|00001c60| 6f 75 0a 73 68 6f 75 6c | 64 20 67 69 76 65 20 69 |ou.shoul|d give i|
|00001c70| 74 73 20 6e 65 74 62 69 | 6f 73 20 6e 61 6d 65 20 |ts netbi|os name |
|00001c80| 62 79 20 0a 2e 42 20 2d | 73 2e 0a 54 68 69 73 20 |by ..B -|s..This |
|00001c90| 6f 70 74 69 6f 6e 20 73 | 68 6f 75 6c 64 20 6f 6e |option s|hould on|
|00001ca0| 6c 79 20 62 65 20 75 73 | 65 64 20 69 66 20 74 68 |ly be us|ed if th|
|00001cb0| 65 20 73 65 72 76 65 72 | 20 72 65 66 75 73 65 73 |e server| refuses|
|00001cc0| 20 79 6f 75 72 20 6c 6f | 67 69 6e 0a 61 74 74 65 | your lo|gin.atte|
|00001cd0| 6d 70 74 20 77 69 74 68 | 6f 75 74 20 74 65 6c 6c |mpt with|out tell|
|00001ce0| 69 6e 67 20 68 69 6d 20 | 61 62 6f 75 74 20 68 69 |ing him |about hi|
|00001cf0| 73 20 6e 65 74 62 69 6f | 73 20 6e 61 6d 65 2e 0a |s netbio|s name..|
|00001d00| 0a 54 68 69 73 20 6f 70 | 74 69 6f 6e 20 64 6f 65 |.This op|tion doe|
|00001d10| 73 20 6e 6f 74 20 61 6c | 74 65 72 20 74 68 65 20 |s not al|ter the |
|00001d20| 77 61 79 20 73 6d 62 6d | 6f 75 6e 74 20 66 69 6e |way smbm|ount fin|
|00001d30| 64 73 20 74 68 65 20 73 | 65 72 76 65 72 27 73 20 |ds the s|erver's |
|00001d40| 49 50 0a 61 64 64 72 65 | 73 73 2e 20 49 74 20 61 |IP.addre|ss. It a|
|00001d50| 6c 77 61 79 73 20 75 73 | 65 73 20 67 65 74 68 6f |lways us|es getho|
|00001d60| 73 74 62 79 6e 61 6d 65 | 28 29 2e 0a 0a 54 68 65 |stbyname|()...The|
|00001d70| 20 64 65 66 61 75 6c 74 | 20 76 61 6c 75 65 20 66 | default| value f|
|00001d80| 6f 72 20 74 68 69 73 20 | 6f 70 74 69 6f 6e 20 69 |or this |option i|
|00001d90| 73 20 74 68 65 20 73 65 | 72 76 65 72 20 6e 61 6d |s the se|rver nam|
|00001da0| 65 20 67 69 76 65 6e 20 | 69 6e 20 74 68 65 0a 73 |e given |in the.s|
|00001db0| 65 72 76 69 63 65 2e 0a | 2e 52 45 0a 0a 2e 42 20 |ervice..|.RE...B |
|00001dc0| 2d 63 0a 2e 49 20 63 6c | 69 65 6e 74 20 6e 61 6d |-c..I cl|ient nam|
|00001dd0| 65 0a 2e 52 53 20 33 0a | 4c 69 6b 65 20 0a 2e 42 |e..RS 3.|Like ..B|
|00001de0| 20 2d 73 2c 20 2d 63 0a | 73 68 6f 75 6c 64 20 62 | -s, -c.|should b|
|00001df0| 65 20 75 73 65 64 20 77 | 68 65 6e 20 6e 65 74 62 |e used w|hen netb|
|00001e00| 69 6f 73 20 6e 61 6d 65 | 73 20 61 6e 64 20 68 6f |ios name|s and ho|
|00001e10| 73 74 6e 61 6d 65 73 20 | 64 69 66 66 65 72 20 61 |stnames |differ a|
|00001e20| 6e 64 20 74 68 65 20 73 | 65 72 76 65 72 0a 72 65 |nd the s|erver.re|
|00001e30| 66 75 73 65 73 20 6c 6f | 67 69 6e 20 77 69 74 68 |fuses lo|gin with|
|00001e40| 20 74 68 65 20 64 65 66 | 61 75 6c 74 20 76 61 6c | the def|ault val|
|00001e50| 75 65 20 66 6f 72 20 74 | 68 65 20 6e 65 74 62 69 |ue for t|he netbi|
|00001e60| 6f 73 20 6e 61 6d 65 3a | 20 79 6f 75 72 20 68 6f |os name:| your ho|
|00001e70| 73 74 6e 61 6d 65 2e 0a | 2e 52 45 0a 0a 2e 42 20 |stname..|.RE...B |
|00001e80| 2d 55 0a 2e 49 20 75 73 | 65 72 20 6e 61 6d 65 0a |-U..I us|er name.|
|00001e90| 2e 52 53 20 33 0a 49 66 | 20 74 68 65 20 75 73 65 |.RS 3.If| the use|
|00001ea0| 72 20 6e 61 6d 65 20 79 | 6f 75 20 4c 61 6e 20 4d |r name y|ou Lan M|
|00001eb0| 61 6e 61 67 65 72 20 61 | 64 6d 69 6e 69 73 74 72 |anager a|dministr|
|00001ec0| 61 74 6f 72 20 67 61 76 | 65 20 74 6f 20 79 6f 75 |ator gav|e to you|
|00001ed0| 20 64 69 66 66 65 72 73 | 0a 66 72 6f 6d 20 79 6f | differs|.from yo|
|00001ee0| 75 72 20 75 6e 69 78 20 | 75 73 65 72 2d 69 64 2c |ur unix |user-id,|
|00001ef0| 20 79 6f 75 20 73 68 6f | 75 6c 64 20 75 73 65 0a | you sho|uld use.|
|00001f00| 2e 42 20 2d 55 0a 74 6f | 20 74 65 6c 6c 20 74 68 |.B -U.to| tell th|
|00001f10| 65 20 73 65 72 76 65 72 | 20 61 62 6f 75 74 20 79 |e server| about y|
|00001f20| 6f 75 20 4c 61 6e 20 4d | 61 6e 61 67 65 72 20 75 |ou Lan M|anager u|
|00001f30| 73 65 72 20 6e 61 6d 65 | 2e 0a 2e 52 45 0a 0a 2e |ser name|...RE...|
|00001f40| 42 20 2d 75 0a 2e 49 20 | 75 69 64 2c 0a 2e 42 20 |B -u..I |uid,..B |
|00001f50| 2d 67 0a 2e 49 20 67 69 | 64 0a 2e 52 53 20 33 0a |-g..I gi|d..RS 3.|
|00001f60| 41 20 4c 61 6e 20 4d 61 | 6e 61 67 65 72 20 73 65 |A Lan Ma|nager se|
|00001f70| 72 76 65 72 20 64 6f 65 | 73 20 6e 6f 74 20 74 65 |rver doe|s not te|
|00001f80| 6c 6c 20 75 73 20 61 6e | 79 74 68 69 6e 67 20 61 |ll us an|ything a|
|00001f90| 62 6f 75 74 20 74 68 65 | 20 6f 77 6e 65 72 20 6f |bout the| owner o|
|00001fa0| 66 20 61 0a 66 69 6c 65 | 2e 20 55 6e 69 78 20 72 |f a.file|. Unix r|
|00001fb0| 65 71 75 69 72 65 73 20 | 74 68 61 74 20 65 61 63 |equires |that eac|
|00001fc0| 68 20 66 69 6c 65 20 68 | 61 73 20 61 6e 20 6f 77 |h file h|as an ow|
|00001fd0| 6e 65 72 20 61 6e 64 20 | 61 20 67 72 6f 75 70 20 |ner and |a group |
|00001fe0| 69 74 20 62 65 6c 6f 6e | 67 73 0a 74 6f 2e 20 57 |it belon|gs.to. W|
|00001ff0| 69 74 68 20 0a 2e 42 20 | 2d 75 0a 61 6e 64 0a 2e |ith ..B |-u.and..|
|00002000| 42 20 2d 67 0a 79 6f 75 | 20 63 61 6e 20 74 65 6c |B -g.you| can tel|
|00002010| 6c 20 73 6d 62 6d 6f 75 | 6e 74 20 77 68 69 63 68 |l smbmou|nt which|
|00002020| 20 69 64 27 73 20 69 74 | 20 73 68 6f 75 6c 64 20 | id's it| should |
|00002030| 61 73 73 69 67 6e 20 74 | 6f 20 74 68 65 20 66 69 |assign t|o the fi|
|00002040| 6c 65 73 20 69 6e 20 74 | 68 65 0a 6d 6f 75 6e 74 |les in t|he.mount|
|00002050| 65 64 20 64 69 72 65 63 | 6f 72 79 2e 0a 0a 54 68 |ed direc|ory...Th|
|00002060| 65 20 64 65 66 61 75 6c | 74 73 20 66 6f 72 20 74 |e defaul|ts for t|
|00002070| 68 65 73 65 20 76 61 6c | 75 65 73 20 61 72 65 20 |hese val|ues are |
|00002080| 74 68 65 20 63 75 72 72 | 65 6e 74 20 75 69 64 20 |the curr|ent uid |
|00002090| 61 6e 64 20 67 69 64 2e | 0a 2e 52 45 0a 0a 2e 42 |and gid.|..RE...B|
|000020a0| 20 2d 66 0a 2e 49 20 66 | 69 6c 65 20 6d 6f 64 65 | -f..I f|ile mode|
|000020b0| 2c 0a 2e 42 20 2d 64 0a | 2e 49 20 64 69 72 20 6d |,..B -d.|.I dir m|
|000020c0| 6f 64 65 0a 2e 52 53 20 | 33 0a 4c 69 6b 65 20 0a |ode..RS |3.Like .|
|000020d0| 2e 42 20 2d 75 0a 61 6e | 64 0a 2e 42 20 2d 67 2c |.B -u.an|d..B -g,|
|000020e0| 0a 74 68 65 73 65 20 6f | 70 74 69 6f 6e 73 20 61 |.these o|ptions a|
|000020f0| 72 65 20 61 6c 73 6f 20 | 75 73 65 64 20 74 6f 20 |re also |used to |
|00002100| 62 72 69 64 67 65 20 64 | 69 66 66 65 72 65 6e 63 |bridge d|ifferenc|
|00002110| 65 73 20 69 6e 20 63 6f | 6e 63 65 70 74 73 20 62 |es in co|ncepts b|
|00002120| 65 74 77 65 65 6e 0a 4c | 61 6e 20 4d 61 6e 61 67 |etween.L|an Manag|
|00002130| 65 72 20 61 6e 64 20 75 | 6e 69 78 2e 20 4c 61 6e |er and u|nix. Lan|
|00002140| 20 4d 61 6e 61 67 65 72 | 20 64 6f 65 73 20 6e 6f | Manager| does no|
|00002150| 74 20 6b 6e 6f 77 20 61 | 6e 79 74 68 69 6e 67 20 |t know a|nything |
|00002160| 61 62 6f 75 74 20 66 69 | 6c 65 0a 70 65 72 6d 69 |about fi|le.permi|
|00002170| 73 73 69 6f 6e 73 2e 20 | 53 6f 20 73 6d 62 6d 6f |ssions. |So smbmo|
|00002180| 75 6e 74 20 68 61 73 20 | 74 6f 20 62 65 20 74 6f |unt has |to be to|
|00002190| 6c 64 20 77 68 69 63 68 | 20 70 65 72 6d 69 73 73 |ld which| permiss|
|000021a0| 69 6f 6e 73 20 69 74 20 | 73 68 6f 75 6c 64 0a 61 |ions it |should.a|
|000021b0| 73 73 69 67 6e 20 74 6f | 20 74 68 65 20 6d 6f 75 |ssign to| the mou|
|000021c0| 6e 74 65 64 20 66 69 6c | 65 73 20 61 6e 64 20 64 |nted fil|es and d|
|000021d0| 69 72 65 63 6f 72 69 65 | 73 2e 20 54 68 65 20 76 |irecorie|s. The v|
|000021e0| 61 6c 75 65 73 20 68 61 | 76 65 20 74 6f 20 62 65 |alues ha|ve to be|
|000021f0| 0a 67 69 76 65 6e 20 61 | 73 20 6f 63 74 61 6c 20 |.given a|s octal |
|00002200| 6e 75 6d 62 65 72 73 2e | 20 54 68 65 20 64 65 66 |numbers.| The def|
|00002210| 61 75 6c 74 20 76 61 6c | 75 65 73 20 61 72 65 20 |ault val|ues are |
|00002220| 74 61 6b 65 6e 20 66 72 | 6f 6d 20 74 68 65 20 63 |taken fr|om the c|
|00002230| 75 72 72 65 6e 74 0a 75 | 6d 61 73 6b 2c 20 77 68 |urrent.u|mask, wh|
|00002240| 65 72 65 20 74 68 65 20 | 66 69 6c 65 20 6d 6f 64 |ere the |file mod|
|00002250| 65 20 69 73 20 74 68 65 | 20 63 75 72 72 65 6e 74 |e is the| current|
|00002260| 20 75 6d 61 73 6b 2c 20 | 61 6e 64 20 74 68 65 20 | umask, |and the |
|00002270| 64 69 72 20 6d 6f 64 65 | 20 61 64 64 73 0a 65 78 |dir mode| adds.ex|
|00002280| 65 63 75 74 65 20 70 65 | 72 6d 69 73 73 69 6f 6e |ecute pe|rmission|
|00002290| 73 20 77 68 65 72 65 20 | 74 68 65 20 66 69 6c 65 |s where |the file|
|000022a0| 20 6d 6f 64 65 20 67 69 | 76 65 73 20 72 65 61 64 | mode gi|ves read|
|000022b0| 20 70 65 72 6d 69 73 73 | 69 6f 6e 73 2e 0a 0a 4e | permiss|ions...N|
|000022c0| 6f 74 65 20 74 68 61 74 | 20 74 68 65 73 65 20 70 |ote that| these p|
|000022d0| 65 72 6d 69 73 73 69 6f | 6e 73 20 63 61 6e 20 64 |ermissio|ns can d|
|000022e0| 69 66 66 65 72 20 66 72 | 6f 6d 20 74 68 65 20 72 |iffer fr|om the r|
|000022f0| 69 67 68 74 73 20 74 68 | 65 20 73 65 72 76 65 72 |ights th|e server|
|00002300| 0a 67 69 76 65 73 20 74 | 6f 20 75 73 2e 20 49 66 |.gives t|o us. If|
|00002310| 20 79 6f 75 20 64 6f 20 | 6e 6f 74 20 68 61 76 65 | you do |not have|
|00002320| 20 77 72 69 74 65 20 70 | 65 72 6d 69 73 73 69 6f | write p|ermissio|
|00002330| 6e 73 20 6f 6e 20 74 68 | 65 20 73 65 72 76 65 72 |ns on th|e server|
|00002340| 2c 20 79 6f 75 0a 63 61 | 6e 20 76 65 72 79 20 77 |, you.ca|n very w|
|00002350| 65 6c 6c 20 63 68 6f 6f | 73 65 20 61 20 66 69 6c |ell choo|se a fil|
|00002360| 65 20 6d 6f 64 65 20 74 | 68 61 74 20 74 65 6c 6c |e mode t|hat tell|
|00002370| 73 20 74 68 61 74 20 79 | 6f 75 20 68 61 76 65 2e |s that y|ou have.|
|00002380| 20 54 68 69 73 0a 63 65 | 72 74 61 69 6e 6c 79 20 | This.ce|rtainly |
|00002390| 63 61 6e 6e 6f 74 20 6f | 76 65 72 72 69 64 65 20 |cannot o|verride |
|000023a0| 74 68 65 20 72 65 73 74 | 72 69 63 74 69 6f 6e 73 |the rest|rictions|
|000023b0| 20 69 6d 70 6f 73 65 64 | 20 62 79 20 74 68 65 20 | imposed| by the |
|000023c0| 73 65 72 76 65 72 2e 0a | 2e 52 45 0a 0a 2e 42 20 |server..|.RE...B |
|000023d0| 2d 70 0a 2e 49 20 70 6f | 72 74 0a 2e 52 53 20 33 |-p..I po|rt..RS 3|
|000023e0| 0a 54 68 65 20 70 6f 72 | 74 20 69 73 20 74 68 65 |.The por|t is the|
|000023f0| 20 54 43 50 20 70 6f 72 | 74 20 73 6d 62 6d 6f 75 | TCP por|t smbmou|
|00002400| 6e 74 20 74 72 69 65 73 | 20 74 6f 20 63 6f 6e 6e |nt tries| to conn|
|00002410| 65 63 74 20 6f 6e 20 74 | 68 65 20 73 65 72 76 65 |ect on t|he serve|
|00002420| 72 2e 20 54 68 65 0a 64 | 65 66 61 75 6c 74 20 66 |r. The.d|efault f|
|00002430| 6f 72 20 74 68 69 73 20 | 76 61 6c 75 65 20 69 73 |or this |value is|
|00002440| 20 31 33 39 2c 20 61 73 | 20 73 70 65 63 69 66 69 | 139, as| specifi|
|00002450| 65 64 20 69 6e 20 52 46 | 43 20 31 30 30 31 2f 31 |ed in RF|C 1001/1|
|00002460| 30 30 32 20 28 4e 65 74 | 42 49 4f 53 0a 6f 76 65 |002 (Net|BIOS.ove|
|00002470| 72 20 54 43 50 2f 49 50 | 29 2e 20 4e 6f 72 6d 61 |r TCP/IP|). Norma|
|00002480| 6c 6c 79 20 69 74 20 73 | 68 6f 75 6c 64 20 6e 6f |lly it s|hould no|
|00002490| 74 20 62 65 20 61 6c 74 | 65 72 65 64 2c 20 61 73 |t be alt|ered, as|
|000024a0| 20 61 6c 6c 20 63 6f 6d | 6d 65 72 63 69 61 6c 0a | all com|mercial.|
|000024b0| 73 65 72 76 65 72 73 20 | 6f 66 66 65 72 20 74 68 |servers |offer th|
|000024c0| 65 69 72 20 73 65 72 76 | 69 63 65 73 20 6f 6e 20 |eir serv|ices on |
|000024d0| 74 68 69 73 20 70 6f 72 | 74 2e 0a 0a 49 20 75 73 |this por|t...I us|
|000024e0| 65 20 69 74 20 69 6e 20 | 6d 79 20 74 65 73 74 69 |e it in |my testi|
|000024f0| 6e 67 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 2c 20 |ng envir|onment, |
|00002500| 77 68 65 72 65 20 73 61 | 6d 62 61 20 72 75 6e 73 |where sa|mba runs|
|00002510| 20 61 73 20 61 20 6e 6f | 72 6d 61 6c 20 75 73 65 | as a no|rmal use|
|00002520| 72 0a 61 6e 64 20 63 61 | 6e 6e 6f 74 20 62 69 6e |r.and ca|nnot bin|
|00002530| 64 28 29 20 74 6f 20 74 | 68 65 20 70 72 69 76 69 |d() to t|he privi|
|00002540| 6c 65 67 65 64 20 70 6f | 72 74 20 31 33 39 2e 0a |leged po|rt 139..|
|00002550| 2e 52 45 0a 0a 2e 42 20 | 2d 6d 0a 2e 49 20 6d 61 |.RE...B |-m..I ma|
|00002560| 78 20 78 6d 69 74 0a 2e | 52 53 20 33 0a 57 69 74 |x xmit..|RS 3.Wit|
|00002570| 68 20 0a 2e 42 20 2d 6d | 0a 79 6f 75 20 63 61 6e |h ..B -m|.you can|
|00002580| 20 74 65 6c 6c 20 73 6d | 62 6d 6f 75 6e 74 20 74 | tell sm|bmount t|
|00002590| 68 61 74 20 69 74 20 73 | 68 6f 75 6c 64 20 6f 66 |hat it s|hould of|
|000025a0| 66 65 72 20 73 6f 6d 65 | 20 73 70 65 63 69 61 6c |fer some| special|
|000025b0| 20 6d 61 78 69 6d 75 6d | 20 70 61 63 6b 65 74 0a | maximum| packet.|
|000025c0| 73 69 7a 65 20 74 68 61 | 74 20 69 74 20 63 61 6e |size tha|t it can|
|000025d0| 20 74 72 61 6e 73 66 65 | 72 20 69 6e 20 6f 6e 65 | transfe|r in one|
|000025e0| 20 53 4d 42 20 70 61 63 | 6b 65 74 2e 20 4e 6f 72 | SMB pac|ket. Nor|
|000025f0| 6d 61 6c 6c 79 20 74 68 | 69 73 20 6f 70 74 69 6f |mally th|is optio|
|00002600| 6e 0a 73 68 6f 75 6c 64 | 20 6e 6f 74 20 62 65 20 |n.should| not be |
|00002610| 75 73 65 64 2e 0a 2e 52 | 45 0a 0a 2e 53 48 20 4e |used...R|E...SH N|
|00002620| 4f 54 45 53 0a 53 6f 6d | 65 20 73 65 72 76 65 72 |OTES.Som|e server|
|00002630| 73 20 61 72 65 20 66 75 | 73 73 79 20 61 62 6f 75 |s are fu|ssy abou|
|00002640| 74 20 74 68 65 20 63 61 | 73 65 20 6f 66 20 73 75 |t the ca|se of su|
|00002650| 70 70 6c 69 65 64 20 75 | 73 65 72 6e 61 6d 65 73 |pplied u|sernames|
|00002660| 2c 20 70 61 73 73 77 6f | 72 64 73 2c 20 73 68 61 |, passwo|rds, sha|
|00002670| 72 65 0a 6e 61 6d 65 73 | 20 28 61 6b 61 20 73 65 |re.names| (aka se|
|00002680| 72 76 69 63 65 20 6e 61 | 6d 65 73 29 20 61 6e 64 |rvice na|mes) and|
|00002690| 20 6d 61 63 68 69 6e 65 | 20 6e 61 6d 65 73 2e 20 | machine| names. |
|000026a0| 49 66 20 79 6f 75 20 66 | 61 69 6c 20 74 6f 20 63 |If you f|ail to c|
|000026b0| 6f 6e 6e 65 63 74 20 74 | 72 79 0a 67 69 76 69 6e |onnect t|ry.givin|
|000026c0| 67 20 61 6c 6c 20 70 61 | 72 61 6d 65 74 65 72 73 |g all pa|rameters|
|000026d0| 20 69 6e 20 75 70 70 65 | 72 63 61 73 65 2e 0a 0a | in uppe|rcase...|
|000026e0| 49 74 20 69 73 20 6f 66 | 74 65 6e 20 6e 65 63 65 |It is of|ten nece|
|000026f0| 73 73 61 72 79 20 74 6f | 20 75 73 65 20 74 68 65 |ssary to| use the|
|00002700| 0a 2e 42 20 2d 6e 0a 6f | 70 74 69 6f 6e 20 77 68 |..B -n.o|ption wh|
|00002710| 65 6e 20 63 6f 6e 6e 65 | 63 74 69 6e 67 20 74 6f |en conne|cting to|
|00002720| 20 73 6f 6d 65 20 74 79 | 70 65 73 0a 6f 66 20 73 | some ty|pes.of s|
|00002730| 65 72 76 65 72 73 2e 20 | 46 6f 72 20 65 78 61 6d |ervers. |For exam|
|00002740| 70 6c 65 20 4f 53 2f 32 | 20 4c 61 6e 4d 61 6e 61 |ple OS/2| LanMana|
|00002750| 67 65 72 20 69 6e 73 69 | 73 74 73 20 6f 6e 20 61 |ger insi|sts on a|
|00002760| 20 76 61 6c 69 64 20 6e | 65 74 62 69 6f 73 20 6e | valid n|etbios n|
|00002770| 61 6d 65 0a 62 65 69 6e | 67 20 75 73 65 64 2c 20 |ame.bein|g used, |
|00002780| 73 6f 20 79 6f 75 20 6e | 65 65 64 20 74 6f 20 73 |so you n|eed to s|
|00002790| 75 70 70 6c 79 20 61 20 | 76 61 6c 69 64 20 6e 61 |upply a |valid na|
|000027a0| 6d 65 20 74 68 61 74 20 | 77 6f 75 6c 64 20 62 65 |me that |would be|
|000027b0| 20 6b 6e 6f 77 6e 20 74 | 6f 0a 74 68 65 20 73 65 | known t|o.the se|
|000027c0| 72 76 65 72 2e 0a 0a 2e | 42 20 73 6d 62 66 73 0a |rver....|B smbfs.|
|000027d0| 73 75 70 70 6f 72 74 73 | 20 6c 6f 6e 67 20 66 69 |supports| long fi|
|000027e0| 6c 65 20 6e 61 6d 65 73 | 20 77 68 65 72 65 20 74 |le names| where t|
|000027f0| 68 65 20 73 65 72 76 65 | 72 20 73 75 70 70 6f 72 |he serve|r suppor|
|00002800| 74 73 20 74 68 65 20 4c | 41 4e 4d 41 4e 32 0a 70 |ts the L|ANMAN2.p|
|00002810| 72 6f 74 6f 63 6f 6c 2e | 0a 0a 2e 53 48 20 45 4e |rotocol.|...SH EN|
|00002820| 56 49 52 4f 4e 4d 45 4e | 54 20 56 41 52 49 41 42 |VIRONMEN|T VARIAB|
|00002830| 4c 45 53 0a 2e 42 20 55 | 53 45 52 20 2f 20 4c 4f |LES..B U|SER / LO|
|00002840| 47 4e 41 4d 45 0a 2e 52 | 53 20 33 0a 54 68 65 20 |GNAME..R|S 3.The |
|00002850| 76 61 72 69 61 62 6c 65 | 73 20 55 53 45 52 20 6f |variable|s USER o|
|00002860| 72 20 4c 4f 47 4e 41 4d | 45 20 6d 61 79 20 63 6f |r LOGNAM|E may co|
|00002870| 6e 74 61 69 6e 20 74 68 | 65 20 75 73 65 72 6e 61 |ntain th|e userna|
|00002880| 6d 65 20 6f 66 20 74 68 | 65 20 70 65 72 73 6f 6e |me of th|e person|
|00002890| 0a 75 73 69 6e 67 20 74 | 68 65 20 63 6c 69 65 6e |.using t|he clien|
|000028a0| 74 2e 20 20 55 53 45 52 | 20 69 73 20 74 72 69 65 |t. USER| is trie|
|000028b0| 64 20 66 69 72 73 74 2e | 20 49 66 20 69 74 27 73 |d first.| If it's|
|000028c0| 20 65 6d 74 70 79 2c 20 | 4c 4f 47 4e 41 4d 45 20 | emtpy, |LOGNAME |
|000028d0| 69 73 0a 74 72 69 65 64 | 2e 20 54 68 69 73 20 69 |is.tried|. This i|
|000028e0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 69 73 20 75 73 |nformati|on is us|
|000028f0| 65 64 20 6f 6e 6c 79 20 | 69 66 20 74 68 65 20 70 |ed only |if the p|
|00002900| 72 6f 74 6f 63 6f 6c 20 | 6c 65 76 65 6c 20 69 73 |rotocol |level is|
|00002910| 20 68 69 67 68 0a 65 6e | 6f 75 67 68 20 74 6f 20 | high.en|ough to |
|00002920| 73 75 70 70 6f 72 74 20 | 73 65 73 73 69 6f 6e 2d |support |session-|
|00002930| 6c 65 76 65 6c 20 70 61 | 73 73 77 6f 72 64 73 2e |level pa|sswords.|
|00002940| 0a 2e 52 45 0a 0a 2e 53 | 48 20 44 49 41 47 4e 4f |..RE...S|H DIAGNO|
|00002950| 53 54 49 43 53 0a 0a 4d | 6f 73 74 20 64 69 61 67 |STICS..M|ost diag|
|00002960| 6e 6f 73 74 69 63 73 20 | 69 73 73 75 65 64 20 62 |nostics |issued b|
|00002970| 79 20 73 6d 62 66 73 20 | 61 72 65 20 6c 6f 67 67 |y smbfs |are logg|
|00002980| 65 64 20 62 79 20 73 79 | 73 6c 6f 67 64 2e 20 4e |ed by sy|slogd. N|
|00002990| 6f 72 6d 61 6c 6c 79 0a | 6e 6f 74 68 69 6e 67 20 |ormally.|nothing |
|000029a0| 69 73 20 70 72 69 6e 74 | 65 64 2c 20 6f 6e 6c 79 |is print|ed, only|
|000029b0| 20 65 72 72 6f 72 20 73 | 69 74 75 61 74 69 6f 6e | error s|ituation|
|000029c0| 73 20 61 72 65 20 6c 6f | 67 67 65 64 20 74 68 65 |s are lo|gged the|
|000029d0| 72 65 2e 0a 0a 49 66 20 | 79 6f 75 20 68 61 76 65 |re...If |you have|
|000029e0| 20 70 72 6f 62 6c 65 6d | 73 20 77 69 74 68 20 73 | problem|s with s|
|000029f0| 6d 62 66 73 2c 20 61 20 | 67 6f 6f 64 20 64 69 61 |mbfs, a |good dia|
|00002a00| 67 6e 6f 73 74 69 63 20 | 74 6f 6f 6c 20 69 73 20 |gnostic |tool is |
|00002a10| 74 68 65 20 70 72 6f 67 | 72 61 6d 0a 73 6d 62 63 |the prog|ram.smbc|
|00002a20| 6c 69 65 6e 74 20 66 72 | 6f 6d 20 74 68 65 20 73 |lient fr|om the s|
|00002a30| 61 6d 62 61 20 70 61 63 | 6b 61 67 65 2e 20 49 66 |amba pac|kage. If|
|00002a40| 20 79 6f 75 72 20 70 72 | 6f 62 6c 65 6d 20 64 6f | your pr|oblem do|
|00002a50| 65 73 20 6e 6f 74 20 6f | 63 63 75 72 20 77 69 74 |es not o|ccur wit|
|00002a60| 68 0a 73 6d 62 63 6c 69 | 65 6e 74 2c 20 74 68 65 |h.smbcli|ent, the|
|00002a70| 6e 20 69 74 27 73 20 64 | 65 66 69 6e 69 74 65 6c |n it's d|efinitel|
|00002a80| 79 20 61 20 70 72 6f 62 | 6c 65 6d 20 77 69 74 68 |y a prob|lem with|
|00002a90| 20 73 6d 62 66 73 2e 20 | 49 66 20 73 6d 62 63 6c | smbfs. |If smbcl|
|00002aa0| 69 65 6e 74 0a 61 6c 73 | 6f 20 73 68 6f 77 73 20 |ient.als|o shows |
|00002ab0| 74 68 65 20 70 72 6f 62 | 6c 65 6d 2c 20 69 74 20 |the prob|lem, it |
|00002ac0| 63 61 6e 20 70 72 69 6e | 74 20 6c 6f 74 73 20 6f |can prin|t lots o|
|00002ad0| 66 20 64 65 62 75 67 67 | 69 6e 67 20 69 6e 66 6f |f debugg|ing info|
|00002ae0| 72 6d 61 74 69 6f 6e 20 | 74 6f 0a 68 65 6c 70 20 |rmation |to.help |
|00002af0| 79 6f 75 20 74 6f 20 66 | 69 6e 64 20 74 68 65 20 |you to f|ind the |
|00002b00| 70 72 6f 62 6c 65 6d 2e | 0a 0a 2e 53 48 20 42 55 |problem.|...SH BU|
|00002b10| 47 53 0a 6d 61 6b 65 20 | 64 6f 65 73 20 6e 6f 74 |GS.make |does not|
|00002b20| 20 66 69 6e 64 20 74 68 | 65 20 4d 61 6b 65 66 69 | find th|e Makefi|
|00002b30| 6c 65 20 69 6e 20 61 20 | 73 6d 62 2d 6d 6f 75 6e |le in a |smb-moun|
|00002b40| 74 65 64 20 64 69 72 65 | 63 6f 72 79 2e 20 57 68 |ted dire|cory. Wh|
|00002b50| 79 3f 3f 3f 20 49 66 0a | 79 6f 75 20 74 79 70 65 |y??? If.|you type|
|00002b60| 20 6d 61 6b 65 20 2d 66 | 20 4d 61 6b 65 66 69 6c | make -f| Makefil|
|00002b70| 65 2c 20 65 76 65 72 79 | 74 68 69 6e 67 20 77 6f |e, every|thing wo|
|00002b80| 72 6b 73 20 66 69 6e 65 | 2e 0a 0a 54 68 65 72 65 |rks fine|...There|
|00002b90| 20 6d 69 67 68 74 20 62 | 65 20 6c 6f 74 73 20 6f | might b|e lots o|
|00002ba0| 66 20 72 61 63 65 20 63 | 6f 6e 64 69 74 69 6f 6e |f race c|ondition|
|00002bb0| 73 20 69 6e 20 74 68 65 | 20 6b 65 72 6e 65 6c 20 |s in the| kernel |
|00002bc0| 63 6f 64 65 2e 20 41 6e | 79 62 6f 64 79 0a 6d 6f |code. An|ybody.mo|
|00002bd0| 72 65 20 65 78 70 65 72 | 69 65 6e 63 65 64 20 69 |re exper|ienced i|
|00002be0| 6e 20 6b 65 72 6e 65 6c | 20 68 61 63 6b 69 6e 67 |n kernel| hacking|
|00002bf0| 20 6d 69 67 68 74 20 74 | 61 6b 65 20 61 20 6c 6f | might t|ake a lo|
|00002c00| 6f 6b 20 61 74 20 69 74 | 20 61 6e 64 20 74 65 6c |ok at it| and tel|
|00002c10| 6c 20 6d 65 0a 61 62 6f | 75 74 20 70 72 6f 62 6c |l me.abo|ut probl|
|00002c20| 65 6d 73 2e 20 49 20 77 | 69 6c 6c 20 64 6f 20 6d |ems. I w|ill do m|
|00002c30| 79 20 62 65 73 74 2e 20 | 46 6f 72 20 65 78 61 6d |y best. |For exam|
|00002c40| 70 6c 65 20 49 20 64 6f | 20 6e 6f 74 20 6b 6e 6f |ple I do| not kno|
|00002c50| 77 20 77 68 69 63 68 0a | 72 6f 75 74 69 6e 65 73 |w which.|routines|
|00002c60| 20 73 6d 62 66 73 20 63 | 61 6c 6c 73 20 69 6e 20 | smbfs c|alls in |
|00002c70| 74 68 65 20 6b 65 72 6e | 65 6c 20 6d 69 67 68 74 |the kern|el might|
|00002c80| 20 63 61 6c 6c 20 73 63 | 68 65 64 75 6c 65 28 29 | call sc|hedule()|
|00002c90| 2e 20 43 61 6e 20 6b 6d | 61 6c 6c 6f 63 0a 63 61 |. Can km|alloc.ca|
|00002ca0| 6c 6c 20 74 68 65 20 73 | 63 68 65 64 75 6c 65 72 |ll the s|cheduler|
|00002cb0| 3f 20 44 6f 65 73 20 6b | 66 72 65 65 3f 0a 0a 59 |? Does k|free?..Y|
|00002cc0| 6f 75 20 6d 69 67 68 74 | 20 73 65 65 20 74 68 65 |ou might| see the|
|00002cd0| 20 75 73 65 20 6f 66 20 | 67 65 74 68 6f 73 74 62 | use of |gethostb|
|00002ce0| 79 6e 61 6d 65 28 29 20 | 74 6f 20 66 69 6e 64 20 |yname() |to find |
|00002cf0| 74 68 65 20 73 65 72 76 | 65 72 20 69 6e 20 61 20 |the serv|er in a |
|00002d00| 77 61 79 0a 6e 6f 74 20 | 63 6f 6e 66 6f 72 6d 69 |way.not |conformi|
|00002d10| 6e 67 20 74 6f 20 4c 61 | 6e 20 4d 61 6e 61 67 65 |ng to La|n Manage|
|00002d20| 72 20 61 73 20 61 20 62 | 75 67 2e 0a 0a 2e 53 48 |r as a b|ug....SH|
|00002d30| 20 53 45 45 20 41 4c 53 | 4f 0a 2e 42 20 73 79 73 | SEE ALS|O..B sys|
|00002d40| 6c 6f 67 64 28 38 29 2c | 20 73 6d 62 75 6d 6f 75 |logd(8),| smbumou|
|00002d50| 6e 74 28 38 29 0a 0a 2e | 53 48 20 43 52 45 44 49 |nt(8)...|SH CREDI|
|00002d60| 54 53 0a 54 68 65 20 6f | 72 69 67 69 6e 61 6c 20 |TS.The o|riginal |
|00002d70| 73 6d 62 66 73 20 6b 65 | 72 6e 65 6c 20 63 6f 64 |smbfs ke|rnel cod|
|00002d80| 65 20 77 61 73 20 61 20 | 6d 69 78 74 75 72 65 20 |e was a |mixture |
|00002d90| 6f 66 20 75 73 65 72 2d | 6c 65 76 65 6c 20 73 6d |of user-|level sm|
|00002da0| 62 66 73 20 61 6e 64 0a | 74 68 65 20 6e 66 73 20 |bfs and.|the nfs |
|00002db0| 63 6f 64 65 2e 20 49 74 | 20 77 61 73 20 70 75 74 |code. It| was put|
|00002dc0| 20 74 6f 67 65 74 68 65 | 72 20 62 79 20 50 61 61 | togethe|r by Paa|
|00002dd0| 6c 2d 4b 72 2e 20 45 6e | 67 73 74 61 64 0a 28 70 |l-Kr. En|gstad.(p|
|00002de0| 6b 65 40 65 6e 67 73 74 | 61 64 2e 69 6e 67 6f 6b |ke@engst|ad.ingok|
|00002df0| 2e 68 69 74 6f 73 2e 6e | 6f 29 20 61 6e 64 20 6c |.hitos.n|o) and l|
|00002e00| 61 74 65 72 20 70 6f 6c | 69 73 68 65 64 20 62 79 |ater pol|ished by|
|00002e10| 20 56 6f 6c 6b 65 72 20 | 4c 65 6e 64 65 63 6b 65 | Volker |Lendecke|
|00002e20| 20 28 6c 65 6e 64 65 63 | 6b 65 40 6e 61 6d 75 30 | (lendec|ke@namu0|
|00002e30| 31 2e 67 77 64 67 2e 64 | 65 29 0a 0a 54 68 65 20 |1.gwdg.d|e)..The |
|00002e40| 6f 72 69 67 69 6e 61 6c | 20 53 61 6d 62 61 20 73 |original| Samba s|
|00002e50| 6f 66 74 77 61 72 65 20 | 61 6e 64 20 72 65 6c 61 |oftware |and rela|
|00002e60| 74 65 64 20 75 74 69 6c | 69 74 69 65 73 20 77 65 |ted util|ities we|
|00002e70| 72 65 20 63 72 65 61 74 | 65 64 20 62 79 20 0a 41 |re creat|ed by .A|
|00002e80| 6e 64 72 65 77 20 54 72 | 69 64 67 65 6c 6c 20 28 |ndrew Tr|idgell (|
|00002e90| 41 6e 64 72 65 77 2e 54 | 72 69 64 67 65 6c 6c 40 |Andrew.T|ridgell@|
|00002ea0| 61 6e 75 2e 65 64 75 2e | 61 75 29 2e 0a 00 00 00 |anu.edu.|au).....|
|00002eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003000| 6b 73 6d 62 66 73 2f 6d | 61 6e 2f 73 6d 62 75 6d |ksmbfs/m|an/smbum|
|00003010| 6f 75 6e 74 2e 38 00 00 | 00 00 00 00 00 00 00 00 |ount.8..|........|
|00003020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003060| 00 00 00 00 30 30 30 34 | 34 34 20 00 30 30 31 34 |....0004|44 .0014|
|00003070| 37 33 20 00 30 30 30 30 | 31 37 20 00 30 30 30 30 |73 .0000|17 .0000|
|00003080| 30 30 30 31 33 34 36 20 | 30 36 30 36 32 37 35 33 |0001346 |06062753|
|00003090| 33 30 30 20 30 31 36 33 | 33 36 20 00 30 00 00 00 |300 0163|36 .0...|
|000030a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003100| 00 75 73 74 61 72 00 30 | 30 6c 65 6e 64 65 63 6b |.ustar.0|0lendeck|
|00003110| 65 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |e.......|........|
|00003120| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00003130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003140| 00 00 00 00 00 00 00 00 | 00 30 30 30 30 30 31 20 |........|.000001 |
|00003150| 00 32 31 37 33 35 37 37 | 20 00 00 00 00 00 00 00 |.2173577| .......|
|00003160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000031a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000031b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000031c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000031d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000031e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000031f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003200| 2e 54 48 20 53 4d 42 55 | 4d 4f 55 4e 54 20 38 20 |.TH SMBU|MOUNT 8 |
|00003210| 32 30 2f 36 2f 31 39 39 | 35 20 73 6d 62 75 6d 6f |20/6/199|5 smbumo|
|00003220| 75 6e 74 20 73 6d 62 75 | 6d 6f 75 6e 74 0a 2e 53 |unt smbu|mount..S|
|00003230| 48 20 4e 41 4d 45 0a 73 | 6d 62 75 6d 6f 75 6e 74 |H NAME.s|mbumount|
|00003240| 20 5c 2d 20 75 6d 6f 75 | 6e 74 20 66 6f 72 20 6e | \- umou|nt for n|
|00003250| 6f 72 6d 61 6c 20 75 73 | 65 72 73 0a 2e 53 48 20 |ormal us|ers..SH |
|00003260| 53 59 4e 4f 50 53 49 53 | 0a 2e 42 20 73 6d 62 75 |SYNOPSIS|..B smbu|
|00003270| 6d 6f 75 6e 74 0a 2e 42 | 20 6d 6f 75 6e 74 2d 70 |mount..B| mount-p|
|00003280| 6f 69 6e 74 0a 0a 2e 53 | 48 20 44 45 53 43 52 49 |oint...S|H DESCRI|
|00003290| 50 54 49 4f 4e 0a 57 69 | 74 68 20 74 68 69 73 20 |PTION.Wi|th this |
|000032a0| 70 72 6f 67 72 61 6d 2c | 20 6e 6f 72 6d 61 6c 20 |program,| normal |
|000032b0| 75 73 65 72 73 20 63 61 | 6e 20 75 6e 6d 6f 75 6e |users ca|n unmoun|
|000032c0| 74 20 73 6d 62 2d 66 69 | 6c 65 73 79 73 74 65 6d |t smb-fi|lesystem|
|000032d0| 73 2c 20 70 72 6f 76 69 | 64 65 64 0a 74 68 61 74 |s, provi|ded.that|
|000032e0| 20 69 74 20 69 73 20 73 | 75 69 64 20 72 6f 6f 74 | it is s|uid root|
|000032f0| 2e 0a 0a 2e 42 20 73 6d | 62 75 6d 6f 75 6e 74 0a |....B sm|bumount.|
|00003300| 68 61 73 20 62 65 65 6e | 20 77 72 69 74 74 65 6e |has been| written|
|00003310| 20 74 6f 20 67 69 76 65 | 20 6e 6f 72 6d 61 6c 20 | to give| normal |
|00003320| 6c 69 6e 75 78 2d 75 73 | 65 72 73 20 6d 6f 72 65 |linux-us|ers more|
|00003330| 20 63 6f 6e 74 72 6f 6c | 20 6f 76 65 72 20 74 68 | control| over th|
|00003340| 65 69 72 0a 72 65 73 6f | 75 72 63 65 73 2e 20 49 |eir.reso|urces. I|
|00003350| 74 20 69 73 20 73 61 66 | 65 20 74 6f 20 69 6e 73 |t is saf|e to ins|
|00003360| 74 61 6c 6c 20 74 68 69 | 73 20 70 72 6f 67 72 61 |tall thi|s progra|
|00003370| 6d 20 73 75 69 64 20 72 | 6f 6f 74 2c 20 62 65 63 |m suid r|oot, bec|
|00003380| 61 75 73 65 20 6f 6e 6c | 79 0a 74 68 65 20 75 73 |ause onl|y.the us|
|00003390| 65 72 20 77 68 6f 20 68 | 61 73 20 6d 6f 75 6e 74 |er who h|as mount|
|000033a0| 65 64 20 61 20 66 69 6c | 65 73 79 73 74 65 6d 20 |ed a fil|esystem |
|000033b0| 69 73 20 61 6c 6c 6f 77 | 65 64 20 74 6f 20 75 6e |is allow|ed to un|
|000033c0| 6d 6f 75 6e 74 20 69 74 | 20 61 67 61 69 6e 2e 0a |mount it| again..|
|000033d0| 0a 46 6f 72 20 72 6f 6f | 74 20 69 74 20 69 73 20 |.For roo|t it is |
|000033e0| 6e 6f 74 20 6e 65 63 65 | 73 73 61 72 79 20 74 6f |not nece|ssary to|
|000033f0| 20 75 73 65 20 73 6d 62 | 75 6d 6f 75 6e 74 2e 20 | use smb|umount. |
|00003400| 54 68 65 20 6e 6f 72 6d | 61 6c 20 75 6d 6f 75 6e |The norm|al umoun|
|00003410| 74 0a 70 72 6f 67 72 61 | 6d 20 77 6f 72 6b 73 20 |t.progra|m works |
|00003420| 70 65 72 66 65 63 74 6c | 79 20 77 65 6c 6c 2c 20 |perfectl|y well, |
|00003430| 62 75 74 20 69 74 20 77 | 6f 75 6c 64 20 63 65 72 |but it w|ould cer|
|00003440| 74 61 69 6e 6c 79 20 62 | 65 20 70 72 6f 62 6c 65 |tainly b|e proble|
|00003450| 6d 61 74 69 63 20 74 6f | 0a 6d 61 6b 65 20 75 6d |matic to|.make um|
|00003460| 6f 75 6e 74 20 73 65 74 | 75 69 64 20 72 6f 6f 74 |ount set|uid root|
|00003470| 2e 0a 0a 2e 53 48 20 4f | 50 54 49 4f 4e 53 0a 2e |....SH O|PTIONS..|
|00003480| 42 20 6d 6f 75 6e 74 2d | 70 6f 69 6e 74 0a 2e 52 |B mount-|point..R|
|00003490| 53 20 33 0a 2e 42 20 6d | 6f 75 6e 74 2d 70 6f 69 |S 3..B m|ount-poi|
|000034a0| 6e 74 0a 69 73 20 74 68 | 65 20 64 69 72 65 63 74 |nt.is th|e direct|
|000034b0| 6f 72 79 20 79 6f 75 20 | 77 61 6e 74 20 74 6f 20 |ory you |want to |
|000034c0| 75 6e 6d 6f 75 6e 74 2e | 0a 0a 2e 53 48 20 53 45 |unmount.|...SH SE|
|000034d0| 45 20 41 4c 53 4f 0a 2e | 42 20 73 6d 62 6d 6f 75 |E ALSO..|B smbmou|
|000034e0| 6e 74 28 38 29 0a 00 00 | 00 00 00 00 00 00 00 00 |nt(8)...|........|
|000034f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003600| 6b 73 6d 62 66 73 2f 75 | 74 69 6c 00 00 00 00 00 |ksmbfs/u|til.....|
|00003610| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003660| 00 00 00 00 30 30 30 37 | 35 35 20 00 30 30 31 34 |....0007|55 .0014|
|00003670| 37 33 20 00 30 30 30 30 | 31 37 20 00 30 30 30 30 |73 .0000|17 .0000|
|00003680| 30 30 30 30 30 30 30 20 | 30 36 30 36 32 37 36 37 |0000000 |06062767|
|00003690| 34 31 37 20 30 31 34 33 | 35 30 20 00 35 00 00 00 |417 0143|50 .5...|
|000036a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003700| 00 75 73 74 61 72 00 30 | 30 6c 65 6e 64 65 63 6b |.ustar.0|0lendeck|
|00003710| 65 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |e.......|........|
|00003720| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00003730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003740| 00 00 00 00 00 00 00 00 | 00 30 30 30 30 30 31 20 |........|.000001 |
|00003750| 00 32 35 36 30 32 37 37 | 20 00 00 00 00 00 00 00 |.2560277| .......|
|00003760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003800| 6b 73 6d 62 66 73 2f 75 | 74 69 6c 2f 73 6d 62 6d |ksmbfs/u|til/smbm|
|00003810| 6f 75 6e 74 2e 63 00 00 | 00 00 00 00 00 00 00 00 |ount.c..|........|
|00003820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003860| 00 00 00 00 30 30 30 36 | 34 34 20 00 30 30 31 34 |....0006|44 .0014|
|00003870| 37 33 20 00 30 30 30 30 | 31 37 20 00 30 30 30 30 |73 .0000|17 .0000|
|00003880| 30 30 34 31 36 30 36 20 | 30 36 30 36 32 37 36 37 |0041606 |06062767|
|00003890| 34 30 36 20 30 31 36 34 | 33 35 20 00 30 00 00 00 |406 0164|35 .0...|
|000038a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003900| 00 75 73 74 61 72 00 30 | 30 6c 65 6e 64 65 63 6b |.ustar.0|0lendeck|
|00003910| 65 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |e.......|........|
|00003920| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00003930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003940| 00 00 00 00 00 00 00 00 | 00 30 30 30 30 30 31 20 |........|.000001 |
|00003950| 00 32 35 36 30 35 34 30 | 20 00 00 00 00 00 00 00 |.2560540| .......|
|00003960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a00| 2f 2a 0a 20 2a 20 20 73 | 6d 62 6d 6f 75 6e 74 2e |/*. * s|mbmount.|
|00003a10| 63 0a 20 2a 0a 20 2a 20 | 20 43 6f 70 79 72 69 67 |c. *. * | Copyrig|
|00003a20| 68 74 20 28 43 29 20 31 | 39 39 35 20 62 79 20 50 |ht (C) 1|995 by P|
|00003a30| 61 61 6c 2d 4b 72 2e 20 | 45 6e 67 73 74 61 64 20 |aal-Kr. |Engstad |
|00003a40| 61 6e 64 20 56 6f 6c 6b | 65 72 20 4c 65 6e 64 65 |and Volk|er Lende|
|00003a50| 63 6b 65 0a 20 2a 0a 20 | 2a 2f 0a 0a 23 69 6e 63 |cke. *. |*/..#inc|
|00003a60| 6c 75 64 65 20 3c 73 74 | 64 69 6f 2e 68 3e 0a 23 |lude <st|dio.h>.#|
|00003a70| 69 6e 63 6c 75 64 65 20 | 3c 73 74 72 69 6e 67 2e |include |<string.|
|00003a80| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 69 67 |h>.#incl|ude <sig|
|00003a90| 6e 61 6c 2e 68 3e 0a 23 | 69 6e 63 6c 75 64 65 20 |nal.h>.#|include |
|00003aa0| 3c 70 77 64 2e 68 3e 0a | 23 69 6e 63 6c 75 64 65 |<pwd.h>.|#include|
|00003ab0| 20 3c 67 72 70 2e 68 3e | 0a 23 69 6e 63 6c 75 64 | <grp.h>|.#includ|
|00003ac0| 65 20 3c 73 79 73 2f 73 | 6f 63 6b 65 74 2e 68 3e |e <sys/s|ocket.h>|
|00003ad0| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 73 79 73 2f 70 |.#includ|e <sys/p|
|00003ae0| 61 72 61 6d 2e 68 3e 0a | 23 69 6e 63 6c 75 64 65 |aram.h>.|#include|
|00003af0| 20 3c 6e 65 74 69 6e 65 | 74 2f 69 6e 2e 68 3e 0a | <netine|t/in.h>.|
|00003b00| 23 69 6e 63 6c 75 64 65 | 20 3c 6e 65 74 64 62 2e |#include| <netdb.|
|00003b10| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 79 73 |h>.#incl|ude <sys|
|00003b20| 2f 73 74 61 74 2e 68 3e | 0a 23 69 6e 63 6c 75 64 |/stat.h>|.#includ|
|00003b30| 65 20 3c 73 79 73 2f 74 | 79 70 65 73 2e 68 3e 0a |e <sys/t|ypes.h>.|
|00003b40| 2f 2a 20 23 69 6e 63 6c | 75 64 65 20 3c 73 79 73 |/* #incl|ude <sys|
|00003b50| 2f 77 61 69 74 2e 68 3e | 20 2a 2f 20 20 2f 2a 20 |/wait.h>| */ /* |
|00003b60| 67 65 6e 65 72 61 74 65 | 73 20 61 20 77 61 72 6e |generate|s a warn|
|00003b70| 69 6e 67 20 68 65 72 65 | 20 2a 2f 0a 65 78 74 65 |ing here| */.exte|
|00003b80| 72 6e 20 70 69 64 5f 74 | 20 77 61 69 74 70 69 64 |rn pid_t| waitpid|
|00003b90| 28 70 69 64 5f 74 2c 20 | 69 6e 74 20 2a 2c 20 69 |(pid_t, |int *, i|
|00003ba0| 6e 74 29 3b 0a 23 69 6e | 63 6c 75 64 65 20 3c 73 |nt);.#in|clude <s|
|00003bb0| 79 73 2f 65 72 72 6e 6f | 2e 68 3e 0a 23 69 6e 63 |ys/errno|.h>.#inc|
|00003bc0| 6c 75 64 65 20 3c 75 6e | 69 73 74 64 2e 68 3e 0a |lude <un|istd.h>.|
|00003bd0| 23 69 6e 63 6c 75 64 65 | 20 3c 66 63 6e 74 6c 2e |#include| <fcntl.|
|00003be0| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 65 72 72 |h>.#incl|ude <err|
|00003bf0| 6e 6f 2e 68 3e 0a 23 69 | 6e 63 6c 75 64 65 20 3c |no.h>.#i|nclude <|
|00003c00| 63 74 79 70 65 2e 68 3e | 0a 23 69 6e 63 6c 75 64 |ctype.h>|.#includ|
|00003c10| 65 20 3c 73 74 64 6c 69 | 62 2e 68 3e 0a 23 69 6e |e <stdli|b.h>.#in|
|00003c20| 63 6c 75 64 65 20 3c 73 | 79 73 2f 6d 6f 75 6e 74 |clude <s|ys/mount|
|00003c30| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 3c 6d 6e |.h>.#inc|lude <mn|
|00003c40| 74 65 6e 74 2e 68 3e 0a | 0a 23 69 6e 63 6c 75 64 |tent.h>.|.#includ|
|00003c50| 65 20 3c 6c 69 6e 75 78 | 2f 66 73 2e 68 3e 0a 23 |e <linux|/fs.h>.#|
|00003c60| 69 6e 63 6c 75 64 65 20 | 3c 6c 69 6e 75 78 2f 73 |include |<linux/s|
|00003c70| 6d 62 2e 68 3e 0a 23 69 | 6e 63 6c 75 64 65 20 3c |mb.h>.#i|nclude <|
|00003c80| 6c 69 6e 75 78 2f 73 6d | 62 5f 6d 6f 75 6e 74 2e |linux/sm|b_mount.|
|00003c90| 68 3e 0a 0a 73 74 61 74 | 69 63 20 63 68 61 72 20 |h>..stat|ic char |
|00003ca0| 2a 70 72 6f 67 6e 61 6d | 65 3b 0a 0a 0a 73 74 61 |*prognam|e;...sta|
|00003cb0| 74 69 63 20 76 6f 69 64 | 0a 73 74 72 5f 75 70 70 |tic void|.str_upp|
|00003cc0| 65 72 28 63 68 61 72 20 | 2a 6e 61 6d 65 29 0a 7b |er(char |*name).{|
|00003cd0| 0a 09 77 68 69 6c 65 20 | 28 2a 6e 61 6d 65 29 20 |..while |(*name) |
|00003ce0| 20 7b 0a 09 09 2a 6e 61 | 6d 65 20 3d 20 74 6f 75 | {...*na|me = tou|
|00003cf0| 70 70 65 72 28 2a 6e 61 | 6d 65 29 3b 0a 09 09 6e |pper(*na|me);...n|
|00003d00| 61 6d 65 20 3d 20 6e 61 | 6d 65 20 2b 20 31 3b 0a |ame = na|me + 1;.|
|00003d10| 09 7d 0a 7d 0a 0a 73 74 | 61 74 69 63 20 76 6f 69 |.}.}..st|atic voi|
|00003d20| 64 0a 75 73 61 67 65 28 | 76 6f 69 64 29 0a 7b 0a |d.usage(|void).{.|
|00003d30| 20 20 20 20 20 20 20 20 | 70 72 69 6e 74 66 28 22 | |printf("|
|00003d40| 75 73 61 67 65 3a 20 25 | 73 20 2f 2f 73 65 72 76 |usage: %|s //serv|
|00003d50| 65 72 2f 73 65 72 76 69 | 63 65 20 6d 6f 75 6e 74 |er/servi|ce mount|
|00003d60| 2d 70 6f 69 6e 74 20 5b | 6f 70 74 69 6f 6e 73 5d |-point [|options]|
|00003d70| 5c 6e 22 2c 20 70 72 6f | 67 6e 61 6d 65 29 3b 0a |\n", pro|gname);.|
|00003d80| 20 20 20 20 20 20 20 20 | 70 72 69 6e 74 66 28 22 | |printf("|
|00003d90| 54 72 79 20 60 25 73 20 | 2d 68 27 20 66 6f 72 20 |Try `%s |-h' for |
|00003da0| 6d 6f 72 65 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |more inf|ormation|
|00003db0| 5c 6e 22 2c 20 70 72 6f | 67 6e 61 6d 65 29 3b 0a |\n", pro|gname);.|
|00003dc0| 7d 0a 0a 73 74 61 74 69 | 63 20 76 6f 69 64 0a 68 |}..stati|c void.h|
|00003dd0| 65 6c 70 28 76 6f 69 64 | 29 0a 7b 0a 20 20 20 20 |elp(void|).{. |
|00003de0| 20 20 20 20 70 72 69 6e | 74 66 28 22 5c 6e 22 29 | prin|tf("\n")|
|00003df0| 3b 0a 20 20 20 20 20 20 | 20 20 70 72 69 6e 74 66 |;. | printf|
|00003e00| 28 22 75 73 61 67 65 3a | 20 25 73 20 2f 2f 73 65 |("usage:| %s //se|
|00003e10| 72 76 65 72 2f 73 65 72 | 76 69 63 65 20 6d 6f 75 |rver/ser|vice mou|
|00003e20| 6e 74 2d 70 6f 69 6e 74 | 20 5b 6f 70 74 69 6f 6e |nt-point| [option|
|00003e30| 73 5d 5c 6e 22 2c 20 70 | 72 6f 67 6e 61 6d 65 29 |s]\n", p|rogname)|
|00003e40| 3b 0a 20 20 20 20 20 20 | 20 20 70 72 69 6e 74 66 |;. | printf|
|00003e50| 28 22 5c 6e 22 0a 20 20 | 20 20 20 20 20 20 20 20 |("\n". | |
|00003e60| 20 20 20 20 20 22 2d 70 | 20 70 6f 72 74 20 20 20 | "-p| port |
|00003e70| 20 20 20 20 20 50 6f 72 | 74 20 74 6f 20 63 6f 6e | Por|t to con|
|00003e80| 6e 65 63 74 20 74 6f 20 | 28 75 73 65 64 20 6f 6e |nect to |(used on|
|00003e90| 6c 79 20 66 6f 72 20 74 | 65 73 74 69 6e 67 29 5c |ly for t|esting)\|
|00003ea0| 6e 22 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |n". | |
|00003eb0| 20 20 22 2d 6d 20 6d 61 | 78 5f 78 6d 69 74 20 20 | "-m ma|x_xmit |
|00003ec0| 20 20 6d 61 78 5f 78 6d | 69 74 20 6f 66 66 65 72 | max_xm|it offer|
|00003ed0| 65 64 20 28 75 73 65 64 | 20 6f 6e 6c 79 20 66 6f |ed (used| only fo|
|00003ee0| 72 20 74 65 73 74 69 6e | 67 29 5c 6e 22 0a 20 20 |r testin|g)\n". |
|00003ef0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 22 5c 6e | | "\n|
|00003f00| 22 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |". | |
|00003f10| 20 22 2d 73 20 73 65 72 | 76 65 72 6e 61 6d 65 20 | "-s ser|vername |
|00003f20| 20 4e 65 74 62 69 6f 73 | 20 6e 61 6d 65 20 6f 66 | Netbios| name of|
|00003f30| 20 73 65 72 76 65 72 5c | 6e 22 0a 20 20 20 20 20 | server\|n". |
|00003f40| 20 20 20 20 20 20 20 20 | 20 20 22 2d 63 20 63 6c | | "-c cl|
|00003f50| 69 65 6e 74 6e 61 6d 65 | 20 20 4e 65 74 62 69 6f |ientname| Netbio|
|00003f60| 73 20 6e 61 6d 65 20 6f | 66 20 63 6c 69 65 6e 74 |s name o|f client|
|00003f70| 5c 6e 22 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |\n". | |
|00003f80| 20 20 20 22 2d 55 20 75 | 73 65 72 6e 61 6d 65 20 | "-U u|sername |
|00003f90| 20 20 20 55 73 65 72 6e | 61 6d 65 20 73 65 6e 74 | Usern|ame sent|
|00003fa0| 20 74 6f 20 73 65 72 76 | 65 72 5c 6e 22 0a 20 20 | to serv|er\n". |
|00003fb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 22 2d 75 | | "-u|
|00003fc0| 20 75 69 64 20 20 20 20 | 20 20 20 20 20 75 69 64 | uid | uid|
|00003fd0| 20 74 68 65 20 6d 6f 75 | 6e 74 65 64 20 66 69 6c | the mou|nted fil|
|00003fe0| 65 73 20 67 65 74 5c 6e | 22 0a 20 20 20 20 20 20 |es get\n|". |
|00003ff0| 20 20 20 20 20 20 20 20 | 20 22 2d 67 20 67 69 64 | | "-g gid|
|00004000| 20 20 20 20 20 20 20 20 | 20 67 69 64 20 74 68 65 | | gid the|
|00004010| 20 6d 6f 75 6e 74 65 64 | 20 66 69 6c 65 73 20 67 | mounted| files g|
|00004020| 65 74 5c 6e 22 0a 20 20 | 20 20 20 20 20 20 20 20 |et\n". | |
|00004030| 20 20 20 20 20 22 2d 66 | 20 6d 6f 64 65 20 20 20 | "-f| mode |
|00004040| 20 20 20 20 20 70 65 72 | 6d 69 73 73 69 6f 6e 20 | per|mission |
|00004050| 74 68 65 20 66 69 6c 65 | 73 20 67 65 74 20 28 6f |the file|s get (o|
|00004060| 63 74 61 6c 20 6e 6f 74 | 61 74 69 6f 6e 29 5c 6e |ctal not|ation)\n|
|00004070| 22 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |". | |
|00004080| 20 22 2d 64 20 6d 6f 64 | 65 20 20 20 20 20 20 20 | "-d mod|e |
|00004090| 20 70 65 72 6d 69 73 73 | 69 6f 6e 20 74 68 65 20 | permiss|ion the |
|000040a0| 64 69 72 73 20 67 65 74 | 20 28 6f 63 74 61 6c 20 |dirs get| (octal |
|000040b0| 6e 6f 74 61 74 69 6f 6e | 29 5c 6e 22 0a 20 20 20 |notation|)\n". |
|000040c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 22 2d 43 20 | | "-C |
|000040d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 44 6f 6e 27 | | Don'|
|000040e0| 74 20 63 6f 6e 76 65 72 | 74 20 70 61 73 73 77 6f |t conver|t passwo|
|000040f0| 72 64 20 74 6f 20 75 70 | 70 65 72 63 61 73 65 5c |rd to up|percase\|
|00004100| 6e 22 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |n". | |
|00004110| 20 20 22 2d 50 20 70 61 | 73 73 77 6f 72 64 20 20 | "-P pa|ssword |
|00004120| 20 20 55 73 65 20 74 68 | 69 73 20 70 61 73 73 77 | Use th|is passw|
|00004130| 6f 72 64 5c 6e 22 0a 20 | 20 20 20 20 20 20 20 20 |ord\n". | |
|00004140| 20 20 20 20 20 20 22 2d | 6e 20 20 20 20 20 20 20 | "-|n |
|00004150| 20 20 20 20 20 20 44 6f | 20 6e 6f 74 20 75 73 65 | Do| not use|
|00004160| 20 61 6e 79 20 70 61 73 | 73 77 6f 72 64 5c 6e 22 | any pas|sword\n"|
|00004170| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004180| 22 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |" | |
|00004190| 49 66 20 6e 65 69 74 68 | 65 72 20 2d 50 20 6e 6f |If neith|er -P no|
|000041a0| 72 20 2d 6e 20 61 72 65 | 20 67 69 76 65 6e 2c 20 |r -n are| given, |
|000041b0| 79 6f 75 20 61 72 65 5c | 6e 22 0a 20 20 20 20 20 |you are\|n". |
|000041c0| 20 20 20 20 20 20 20 20 | 20 20 22 20 20 20 20 20 | | " |
|000041d0| 20 20 20 20 20 20 20 20 | 20 20 61 73 6b 65 64 20 | | asked |
|000041e0| 66 6f 72 20 61 20 70 61 | 73 73 77 6f 72 64 2e 5c |for a pa|ssword.\|
|000041f0| 6e 22 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |n". | |
|00004200| 20 20 22 2d 68 20 20 20 | 20 20 20 20 20 20 20 20 | "-h | |
|00004210| 20 20 70 72 69 6e 74 20 | 74 68 69 73 20 68 65 6c | print |this hel|
|00004220| 70 20 74 65 78 74 5c 6e | 22 0a 20 20 20 20 20 20 |p text\n|". |
|00004230| 20 20 20 20 20 20 20 20 | 20 22 5c 6e 22 29 3b 0a | | "\n");.|
|00004240| 7d 0a 0a 73 74 61 74 69 | 63 20 69 6e 74 0a 70 61 |}..stati|c int.pa|
|00004250| 72 73 65 5f 61 72 67 73 | 28 69 6e 74 20 61 72 67 |rse_args|(int arg|
|00004260| 63 2c 20 63 68 61 72 20 | 2a 61 72 67 76 5b 5d 2c |c, char |*argv[],|
|00004270| 20 73 74 72 75 63 74 20 | 73 6d 62 5f 6d 6f 75 6e | struct |smb_moun|
|00004280| 74 5f 64 61 74 61 20 2a | 64 61 74 61 2c 0a 20 20 |t_data *|data,. |
|00004290| 20 20 20 20 20 20 20 20 | 20 69 6e 74 20 2a 67 6f | | int *go|
|000042a0| 74 5f 70 61 73 73 77 6f | 72 64 2c 20 69 6e 74 20 |t_passwo|rd, int |
|000042b0| 2a 75 70 63 61 73 65 5f | 70 61 73 73 77 6f 72 64 |*upcase_|password|
|000042c0| 29 0a 7b 0a 20 20 20 20 | 20 20 20 20 69 6e 74 20 |).{. | int |
|000042d0| 6f 70 74 3b 0a 20 20 20 | 20 20 20 20 20 73 74 72 |opt;. | str|
|000042e0| 75 63 74 20 70 61 73 73 | 77 64 20 2a 70 77 64 3b |uct pass|wd *pwd;|
|000042f0| 0a 20 20 20 20 20 20 20 | 20 73 74 72 75 63 74 20 |. | struct |
|00004300| 67 72 6f 75 70 20 20 2a | 67 72 70 3b 0a 0a 20 20 |group *|grp;.. |
|00004310| 20 20 20 20 20 20 2a 67 | 6f 74 5f 70 61 73 73 77 | *g|ot_passw|
|00004320| 6f 72 64 20 3d 20 30 3b | 0a 20 20 20 20 20 20 20 |ord = 0;|. |
|00004330| 20 2a 75 70 63 61 73 65 | 5f 70 61 73 73 77 6f 72 | *upcase|_passwor|
|00004340| 64 20 3d 20 31 3b 0a 0a | 20 20 20 20 20 20 20 20 |d = 1;..| |
|00004350| 77 68 69 6c 65 20 28 28 | 6f 70 74 20 3d 20 67 65 |while ((|opt = ge|
|00004360| 74 6f 70 74 20 28 61 72 | 67 63 2c 20 61 72 67 76 |topt (ar|gc, argv|
|00004370| 2c 20 22 43 70 3a 73 3a | 63 3a 55 3a 75 3a 67 3a |, "Cp:s:|c:U:u:g:|
|00004380| 66 3a 64 3a 6d 3a 50 3a | 6e 22 29 29 20 21 3d 20 |f:d:m:P:|n")) != |
|00004390| 45 4f 46 29 20 7b 0a 20 | 20 20 20 20 20 20 20 20 |EOF) {. | |
|000043a0| 20 20 20 20 20 20 20 73 | 77 69 74 63 68 20 28 6f | s|witch (o|
|000043b0| 70 74 29 20 7b 0a 20 20 | 20 20 20 20 20 20 20 20 |pt) {. | |
|000043c0| 20 20 20 20 20 20 63 61 | 73 65 20 27 43 27 3a 0a | ca|se 'C':.|
|000043d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000043e0| 20 20 20 20 20 20 20 20 | 2a 75 70 63 61 73 65 5f | |*upcase_|
|000043f0| 70 61 73 73 77 6f 72 64 | 20 3d 20 30 3b 0a 20 20 |password| = 0;. |
|00004400| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004410| 20 20 20 20 20 20 62 72 | 65 61 6b 3b 0a 20 20 20 | br|eak;. |
|00004420| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 63 61 73 | | cas|
|00004430| 65 20 27 70 27 3a 0a 20 | 20 20 20 20 20 20 20 20 |e 'p':. | |
|00004440| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 64 | | d|
|00004450| 61 74 61 2d 3e 61 64 64 | 72 2e 73 69 6e 5f 70 6f |ata->add|r.sin_po|
|00004460| 72 74 20 3d 20 68 74 6f | 6e 73 28 61 74 6f 69 28 |rt = hto|ns(atoi(|
|00004470| 6f 70 74 61 72 67 29 29 | 3b 0a 20 20 20 20 20 20 |optarg))|;. |
|00004480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004490| 20 20 62 72 65 61 6b 3b | 0a 20 20 20 20 20 20 20 | break;|. |
|000044a0| 20 20 20 20 20 20 20 20 | 20 63 61 73 65 20 27 73 | | case 's|
|000044b0| 27 3a 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |':. | |
|000044c0| 20 20 20 20 20 20 20 20 | 20 20 20 69 66 20 28 73 | | if (s|
|000044d0| 74 72 6c 65 6e 28 6f 70 | 74 61 72 67 29 20 3e 20 |trlen(op|targ) > |
|000044e0| 31 36 29 20 7b 0a 20 20 | 20 20 20 20 20 20 20 20 |16) {. | |
|000044f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004500| 20 20 20 20 20 20 66 70 | 72 69 6e 74 66 28 73 74 | fp|rintf(st|
|00004510| 64 65 72 72 2c 20 22 53 | 65 72 76 65 72 20 6e 61 |derr, "S|erver na|
|00004520| 6d 65 20 74 6f 6f 20 6c | 6f 6e 67 3a 20 25 73 5c |me too l|ong: %s\|
|00004530| 6e 22 2c 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |n",. | |
|00004540| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004550| 20 20 20 20 20 20 20 20 | 20 20 20 20 6f 70 74 61 | | opta|
|00004560| 72 67 29 3b 0a 20 20 20 | 20 20 20 20 20 20 20 20 |rg);. | |
|00004570| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004580| 20 20 20 20 20 72 65 74 | 75 72 6e 20 31 3b 0a 20 | ret|urn 1;. |
|00004590| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000045a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 62 | | b|
|000045b0| 72 65 61 6b 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |reak;. | |
|000045c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7d 0a | | }.|
|000045d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000045e0| 20 20 20 20 20 20 20 20 | 73 74 72 63 70 79 28 64 | |strcpy(d|
|000045f0| 61 74 61 2d 3e 73 65 72 | 76 65 72 5f 6e 61 6d 65 |ata->ser|ver_name|
|00004600| 2c 20 6f 70 74 61 72 67 | 29 3b 0a 20 20 20 20 20 |, optarg|);. |
|00004610| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004620| 20 20 20 62 72 65 61 6b | 3b 0a 20 20 20 20 20 20 | break|;. |
|00004630| 20 20 20 20 20 20 20 20 | 20 20 63 61 73 65 20 27 | | case '|
|00004640| 63 27 3a 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |c':. | |
|00004650| 20 20 20 20 20 20 20 20 | 20 20 20 20 69 66 20 28 | | if (|
|00004660| 73 74 72 6c 65 6e 28 6f | 70 74 61 72 67 29 20 3e |strlen(o|ptarg) >|
|00004670| 20 31 36 29 20 7b 0a 20 | 20 20 20 20 20 20 20 20 | 16) {. | |
|00004680| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004690| 20 20 20 20 20 20 20 66 | 70 72 69 6e 74 66 28 73 | f|printf(s|
|000046a0| 74 64 65 72 72 2c 20 22 | 43 6c 69 65 6e 74 20 6e |tderr, "|Client n|
|000046b0| 61 6d 65 20 74 6f 6f 20 | 6c 6f 6e 67 3a 20 25 73 |ame too |long: %s|
|000046c0| 5c 6e 22 2c 0a 20 20 20 | 20 20 20 20 20 20 20 20 |\n",. | |
|000046d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000046e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6f 70 74 | | opt|
|000046f0| 61 72 67 29 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |arg);. | |
|00004700| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004710| 20 20 20 20 20 20 72 65 | 74 75 72 6e 20 31 3b 0a | re|turn 1;.|
|00004720| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004730| 20 20 20 20 20 20 20 20 | 7d 0a 20 20 20 20 20 20 | |}. |
|00004740| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004750| 20 20 73 74 72 63 70 79 | 28 64 61 74 61 2d 3e 63 | strcpy|(data->c|
|00004760| 6c 69 65 6e 74 5f 6e 61 | 6d 65 2c 20 6f 70 74 61 |lient_na|me, opta|
|00004770| 72 67 29 3b 0a 20 20 20 | 20 20 20 20 20 20 20 20 |rg);. | |
|00004780| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 62 72 65 | | bre|
|00004790| 61 6b 3b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ak;. | |
|000047a0| 20 20 20 20 63 61 73 65 | 20 27 55 27 3a 0a 20 20 | case| 'U':. |
|000047b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000047c0| 20 20 20 20 20 20 69 66 | 20 28 73 74 72 6c 65 6e | if| (strlen|
|000047d0| 28 6f 70 74 61 72 67 29 | 20 3e 20 36 33 29 20 7b |(optarg)| > 63) {|
|000047e0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000047f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004800| 20 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c | fprintf|(stderr,|
|00004810| 20 22 55 73 65 72 6e 61 | 6d 65 20 74 6f 6f 20 6c | "Userna|me too l|
|00004820| 6f 6e 67 3a 20 25 73 5c | 6e 22 2c 0a 20 20 20 20 |ong: %s\|n",. |
|00004830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004840| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004850| 20 20 20 20 6f 70 74 61 | 72 67 29 3b 0a 20 20 20 | opta|rg);. |
|00004860| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004870| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 72 65 74 | | ret|
|00004880| 75 72 6e 20 31 3b 0a 20 | 20 20 20 20 20 20 20 20 |urn 1;. | |
|00004890| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7d | | }|
|000048a0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000048b0| 20 20 20 20 20 20 20 20 | 20 73 74 72 63 70 79 28 | | strcpy(|
|000048c0| 64 61 74 61 2d 3e 75 73 | 65 72 6e 61 6d 65 2c 20 |data->us|ername, |
|000048d0| 6f 70 74 61 72 67 29 3b | 0a 20 20 20 20 20 20 20 |optarg);|. |
|000048e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000048f0| 20 62 72 65 61 6b 3b 0a | 20 20 20 20 20 20 20 20 | break;.| |
|00004900| 20 20 20 20 20 20 20 20 | 63 61 73 65 20 27 75 27 | |case 'u'|
|00004910| 3a 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |:. | |
|00004920| 20 20 20 20 20 20 20 20 | 20 20 69 66 20 28 69 73 | | if (is|
|00004930| 64 69 67 69 74 28 6f 70 | 74 61 72 67 5b 30 5d 29 |digit(op|targ[0])|
|00004940| 29 20 7b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |) {. | |
|00004950| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004960| 20 20 20 20 64 61 74 61 | 2d 3e 75 69 64 20 3d 20 | data|->uid = |
|00004970| 61 74 6f 69 28 6f 70 74 | 61 72 67 29 3b 0a 20 20 |atoi(opt|arg);. |
|00004980| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004990| 20 20 20 20 20 20 7d 20 | 65 6c 73 65 20 7b 0a 20 | } |else {. |
|000049a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000049b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 70 | | p|
|000049c0| 77 64 20 3d 20 67 65 74 | 70 77 6e 61 6d 28 6f 70 |wd = get|pwnam(op|
|000049d0| 74 61 72 67 29 3b 0a 20 | 20 20 20 20 20 20 20 20 |targ);. | |
|000049e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000049f0| 20 20 20 20 20 20 20 69 | 66 20 28 70 77 64 20 3d | i|f (pwd =|
|00004a00| 3d 20 4e 55 4c 4c 29 20 | 7b 0a 20 20 20 20 20 20 |= NULL) |{. |
|00004a10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004a20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004a30| 20 20 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 | fprint|f(stderr|
|00004a40| 2c 20 22 55 6e 6b 6e 6f | 77 6e 20 75 73 65 72 3a |, "Unkno|wn user:|
|00004a50| 20 25 73 5c 6e 22 2c 0a | 20 20 20 20 20 20 20 20 | %s\n",.| |
|00004a60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004a70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004a80| 20 20 20 20 20 20 20 20 | 6f 70 74 61 72 67 29 3b | |optarg);|
|00004a90| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004aa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004ab0| 20 20 20 20 20 20 20 20 | 20 72 65 74 75 72 6e 20 | | return |
|00004ac0| 31 3b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |1;. | |
|00004ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004ae0| 20 20 20 7d 0a 20 20 20 | 20 20 20 20 20 20 20 20 | }. | |
|00004af0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004b00| 20 20 20 20 20 64 61 74 | 61 2d 3e 75 69 64 20 3d | dat|a->uid =|
|00004b10| 20 70 77 64 2d 3e 70 77 | 5f 75 69 64 3b 0a 20 20 | pwd->pw|_uid;. |
|00004b20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004b30| 20 20 20 20 20 20 7d 0a | 20 20 20 20 20 20 20 20 | }.| |
|00004b40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004b50| 62 72 65 61 6b 3b 0a 20 | 20 20 20 20 20 20 20 20 |break;. | |
|00004b60| 20 20 20 20 20 20 20 63 | 61 73 65 20 27 67 27 3a | c|ase 'g':|
|00004b70| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004b80| 20 20 20 20 20 20 20 20 | 20 69 66 20 28 69 73 64 | | if (isd|
|00004b90| 69 67 69 74 28 6f 70 74 | 61 72 67 5b 30 5d 29 29 |igit(opt|arg[0]))|
|00004ba0| 20 7b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|00004bb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004bc0| 20 20 20 64 61 74 61 2d | 3e 67 69 64 20 3d 20 61 | data-|>gid = a|
|00004bd0| 74 6f 69 28 6f 70 74 61 | 72 67 29 3b 0a 20 20 20 |toi(opta|rg);. |
|00004be0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004bf0| 20 20 20 20 20 7d 20 65 | 6c 73 65 20 7b 0a 20 20 | } e|lse {. |
|00004c00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004c10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 67 72 | | gr|
|00004c20| 70 20 3d 20 67 65 74 67 | 72 6e 61 6d 28 6f 70 74 |p = getg|rnam(opt|
|00004c30| 61 72 67 29 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |arg);. | |
|00004c40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004c50| 20 20 20 20 20 20 69 66 | 20 28 67 72 70 20 3d 3d | if| (grp ==|
|00004c60| 20 4e 55 4c 4c 29 20 7b | 0a 20 20 20 20 20 20 20 | NULL) {|. |
|00004c70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004c80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004c90| 20 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c | fprintf|(stderr,|
|00004ca0| 20 22 55 6e 6b 6e 6f 77 | 6e 20 67 72 6f 75 70 3a | "Unknow|n group:|
|00004cb0| 20 25 73 5c 6e 22 2c 0a | 20 20 20 20 20 20 20 20 | %s\n",.| |
|00004cc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004cd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004ce0| 20 20 20 20 20 20 20 20 | 6f 70 74 61 72 67 29 3b | |optarg);|
|00004cf0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004d00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004d10| 20 20 20 20 20 20 20 20 | 20 72 65 74 75 72 6e 20 | | return |
|00004d20| 31 3b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |1;. | |
|00004d30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004d40| 20 20 20 7d 0a 20 20 20 | 20 20 20 20 20 20 20 20 | }. | |
|00004d50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004d60| 20 20 20 20 20 64 61 74 | 61 2d 3e 67 69 64 20 3d | dat|a->gid =|
|00004d70| 20 67 72 70 2d 3e 67 72 | 5f 67 69 64 3b 0a 20 20 | grp->gr|_gid;. |
|00004d80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004d90| 20 20 20 20 20 20 7d 0a | 20 20 20 20 20 20 20 20 | }.| |
|00004da0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004db0| 62 72 65 61 6b 3b 0a 20 | 20 20 20 20 20 20 20 20 |break;. | |
|00004dc0| 20 20 20 20 20 20 20 63 | 61 73 65 20 27 66 27 3a | c|ase 'f':|
|00004dd0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004de0| 20 20 20 20 20 20 20 20 | 20 64 61 74 61 2d 3e 66 | | data->f|
|00004df0| 69 6c 65 5f 6d 6f 64 65 | 20 3d 20 73 74 72 74 6f |ile_mode| = strto|
|00004e00| 6c 28 6f 70 74 61 72 67 | 2c 20 4e 55 4c 4c 2c 20 |l(optarg|, NULL, |
|00004e10| 38 29 3b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |8);. | |
|00004e20| 20 20 20 20 20 20 20 20 | 20 20 20 20 62 72 65 61 | | brea|
|00004e30| 6b 3b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |k;. | |
|00004e40| 20 20 20 63 61 73 65 20 | 27 64 27 3a 0a 20 20 20 | case |'d':. |
|00004e50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004e60| 20 20 20 20 20 64 61 74 | 61 2d 3e 64 69 72 5f 6d | dat|a->dir_m|
|00004e70| 6f 64 65 20 3d 20 73 74 | 72 74 6f 6c 28 6f 70 74 |ode = st|rtol(opt|
|00004e80| 61 72 67 2c 20 4e 55 4c | 4c 2c 20 38 29 3b 0a 20 |arg, NUL|L, 8);. |
|00004e90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004ea0| 20 20 20 20 20 20 20 62 | 72 65 61 6b 3b 0a 20 20 | b|reak;. |
|00004eb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 63 61 | | ca|
|00004ec0| 73 65 20 27 6d 27 3a 0a | 20 20 20 20 20 20 20 20 |se 'm':.| |
|00004ed0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004ee0| 64 61 74 61 2d 3e 6d 61 | 78 5f 78 6d 69 74 20 3d |data->ma|x_xmit =|
|00004ef0| 20 61 74 6f 69 28 6f 70 | 74 61 72 67 29 3b 0a 20 | atoi(op|targ);. |
|00004f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004f10| 20 20 20 20 20 20 20 62 | 72 65 61 6b 3b 0a 20 20 | b|reak;. |
|00004f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 63 61 | | ca|
|00004f30| 73 65 20 27 50 27 3a 0a | 20 20 20 20 20 20 20 20 |se 'P':.| |
|00004f40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004f50| 73 74 72 63 70 79 28 64 | 61 74 61 2d 3e 70 61 73 |strcpy(d|ata->pas|
|00004f60| 73 77 6f 72 64 2c 20 6f | 70 74 61 72 67 29 3b 0a |sword, o|ptarg);.|
|00004f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004f80| 20 20 20 20 20 20 20 20 | 2a 67 6f 74 5f 70 61 73 | |*got_pas|
|00004f90| 73 77 6f 72 64 20 3d 20 | 31 3b 0a 20 20 20 20 20 |sword = |1;. |
|00004fa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004fb0| 20 20 20 62 72 65 61 6b | 3b 0a 20 20 20 20 20 20 | break|;. |
|00004fc0| 20 20 20 20 20 20 20 20 | 20 20 63 61 73 65 20 27 | | case '|
|00004fd0| 6e 27 3a 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |n':. | |
|00004fe0| 20 20 20 20 20 20 20 20 | 20 20 20 20 2a 67 6f 74 | | *got|
|00004ff0| 5f 70 61 73 73 77 6f 72 | 64 20 3d 20 31 3b 0a 20 |_passwor|d = 1;. |
|00005000| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005010| 20 20 20 20 20 20 20 62 | 72 65 61 6b 3b 0a 20 20 | b|reak;. |
|00005020| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 64 65 | | de|
|00005030| 66 61 75 6c 74 3a 0a 20 | 20 20 20 20 20 20 20 20 |fault:. | |
|00005040| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 72 | | r|
|00005050| 65 74 75 72 6e 20 2d 31 | 3b 0a 20 20 20 20 20 20 |eturn -1|;. |
|00005060| 20 20 20 20 20 20 20 20 | 20 20 7d 0a 20 20 20 20 | | }. |
|00005070| 20 20 20 20 7d 0a 20 20 | 20 20 20 20 20 20 72 65 | }. | re|
|00005080| 74 75 72 6e 20 30 3b 0a | 20 20 20 20 20 20 20 20 |turn 0;.| |
|00005090| 0a 7d 0a 0a 23 69 66 20 | 30 0a 73 74 61 74 69 63 |.}..#if |0.static|
|000050a0| 20 63 68 61 72 20 2a 2a | 0a 70 61 72 73 65 5f 6f | char **|.parse_o|
|000050b0| 70 74 66 69 6c 65 28 63 | 6f 6e 73 74 20 63 68 61 |ptfile(c|onst cha|
|000050c0| 72 20 2a 75 73 65 72 2c | 20 63 6f 6e 73 74 20 63 |r *user,| const c|
|000050d0| 68 61 72 20 2a 73 65 72 | 76 65 72 2c 20 63 6f 6e |har *ser|ver, con|
|000050e0| 73 74 20 63 68 61 72 20 | 2a 73 65 72 76 69 63 65 |st char |*service|
|000050f0| 29 0a 7b 0a 20 20 20 20 | 20 20 20 20 63 68 61 72 |).{. | char|
|00005100| 20 66 69 6c 65 6e 61 6d | 65 5b 31 30 32 34 5d 3b | filenam|e[1024];|
|00005110| 0a 20 20 20 20 20 20 20 | 20 63 68 61 72 20 63 6f |. | char co|
|00005120| 6d 70 6c 65 74 65 5f 73 | 65 72 76 69 63 65 5b 31 |mplete_s|ervice[1|
|00005130| 30 32 34 5d 3b 0a 0a 20 | 20 20 20 20 20 20 20 73 |024];.. | s|
|00005140| 74 61 74 69 63 20 63 68 | 61 72 20 6c 69 6e 65 5b |tatic ch|ar line[|
|00005150| 31 30 32 34 5d 3b 0a 20 | 20 20 20 20 20 20 20 73 |1024];. | s|
|00005160| 74 61 74 69 63 20 63 68 | 61 72 20 2a 61 72 67 76 |tatic ch|ar *argv|
|00005170| 5b 35 30 5d 3b 0a 0a 20 | 20 20 20 20 20 20 20 72 |[50];.. | r|
|00005180| 65 74 75 72 6e 20 61 72 | 67 76 3b 0a 7d 0a 23 65 |eturn ar|gv;.}.#e|
|00005190| 6e 64 69 66 0a 0a 73 74 | 61 74 69 63 20 69 6e 74 |ndif..st|atic int|
|000051a0| 0a 65 78 74 72 61 63 74 | 5f 73 65 72 76 69 63 65 |.extract|_service|
|000051b0| 28 63 6f 6e 73 74 20 63 | 68 61 72 20 2a 73 65 72 |(const c|har *ser|
|000051c0| 76 69 63 65 2c 20 63 68 | 61 72 20 2a 2a 73 65 72 |vice, ch|ar **ser|
|000051d0| 76 65 72 2c 20 63 68 61 | 72 20 2a 2a 73 68 61 72 |ver, cha|r **shar|
|000051e0| 65 2c 20 63 68 61 72 20 | 2a 2a 72 6f 6f 74 2c 0a |e, char |**root,.|
|000051f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005200| 63 68 61 72 20 2a 2a 75 | 73 65 72 29 0a 7b 0a 20 |char **u|ser).{. |
|00005210| 20 20 20 20 20 20 20 63 | 68 61 72 20 73 65 72 76 | c|har serv|
|00005220| 69 63 65 5f 63 6f 70 79 | 5b 73 74 72 6c 65 6e 28 |ice_copy|[strlen(|
|00005230| 73 65 72 76 69 63 65 29 | 2b 31 5d 3b 0a 20 20 20 |service)|+1];. |
|00005240| 20 20 20 20 20 63 68 61 | 72 20 2a 63 6f 6d 70 6c | cha|r *compl|
|00005250| 65 74 65 5f 73 65 72 76 | 69 63 65 3b 0a 0a 20 20 |ete_serv|ice;.. |
|00005260| 20 20 20 20 20 20 63 68 | 61 72 20 2a 73 68 61 72 | ch|ar *shar|
|00005270| 65 5f 73 74 61 72 74 3b | 0a 20 20 20 20 20 20 20 |e_start;|. |
|00005280| 20 63 68 61 72 20 2a 72 | 6f 6f 74 5f 73 74 61 72 | char *r|oot_star|
|00005290| 74 3b 0a 20 20 20 20 20 | 20 20 20 63 68 61 72 20 |t;. | char |
|000052a0| 2a 75 73 65 72 5f 73 74 | 61 72 74 3b 0a 0a 20 20 |*user_st|art;.. |
|000052b0| 20 20 20 20 20 20 73 74 | 61 74 69 63 20 63 68 61 | st|atic cha|
|000052c0| 72 20 73 5f 73 65 72 76 | 65 72 5b 36 34 5d 3b 0a |r s_serv|er[64];.|
|000052d0| 20 20 20 20 20 20 20 20 | 73 74 61 74 69 63 20 63 | |static c|
|000052e0| 68 61 72 20 73 5f 73 68 | 61 72 65 20 5b 36 34 5d |har s_sh|are [64]|
|000052f0| 3b 0a 20 20 20 20 20 20 | 20 20 73 74 61 74 69 63 |;. | static|
|00005300| 20 63 68 61 72 20 73 5f | 72 6f 6f 74 20 20 5b 36 | char s_|root [6|
|00005310| 34 5d 3b 0a 20 20 20 20 | 20 20 20 20 73 74 61 74 |4];. | stat|
|00005320| 69 63 20 63 68 61 72 20 | 73 5f 75 73 65 72 20 20 |ic char |s_user |
|00005330| 5b 36 34 5d 3b 0a 0a 20 | 20 20 20 20 20 20 20 73 |[64];.. | s|
|00005340| 74 72 63 70 79 28 73 65 | 72 76 69 63 65 5f 63 6f |trcpy(se|rvice_co|
|00005350| 70 79 2c 20 73 65 72 76 | 69 63 65 29 3b 0a 20 20 |py, serv|ice);. |
|00005360| 20 20 20 20 20 20 63 6f | 6d 70 6c 65 74 65 5f 73 | co|mplete_s|
|00005370| 65 72 76 69 63 65 20 3d | 20 73 65 72 76 69 63 65 |ervice =| service|
|00005380| 5f 63 6f 70 79 3b 0a 0a | 20 20 20 20 20 20 20 20 |_copy;..| |
|00005390| 69 66 20 28 73 74 72 6c | 65 6e 28 63 6f 6d 70 6c |if (strl|en(compl|
|000053a0| 65 74 65 5f 73 65 72 76 | 69 63 65 29 20 3c 20 34 |ete_serv|ice) < 4|
|000053b0| 29 20 7b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |) {. | |
|000053c0| 20 20 20 20 72 65 74 75 | 72 6e 20 2d 31 3b 0a 20 | retu|rn -1;. |
|000053d0| 20 20 20 20 20 20 20 7d | 0a 0a 20 20 20 20 20 20 | }|.. |
|000053e0| 20 20 69 66 20 28 63 6f | 6d 70 6c 65 74 65 5f 73 | if (co|mplete_s|
|000053f0| 65 72 76 69 63 65 5b 30 | 5d 20 21 3d 20 27 2f 27 |ervice[0|] != '/'|
|00005400| 29 20 7b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |) {. | |
|00005410| 20 20 20 20 72 65 74 75 | 72 6e 20 2d 31 3b 0a 20 | retu|rn -1;. |
|00005420| 20 20 20 20 20 20 20 7d | 0a 0a 20 20 20 20 20 20 | }|.. |
|00005430| 20 20 77 68 69 6c 65 20 | 28 63 6f 6d 70 6c 65 74 | while |(complet|
|00005440| 65 5f 73 65 72 76 69 63 | 65 5b 30 5d 20 3d 3d 20 |e_servic|e[0] == |
|00005450| 27 2f 27 29 20 63 6f 6d | 70 6c 65 74 65 5f 73 65 |'/') com|plete_se|
|00005460| 72 76 69 63 65 20 2b 3d | 20 31 3b 0a 0a 20 20 20 |rvice +=| 1;.. |
|00005470| 20 20 20 20 20 73 68 61 | 72 65 5f 73 74 61 72 74 | sha|re_start|
|00005480| 20 3d 20 73 74 72 63 68 | 72 28 63 6f 6d 70 6c 65 | = strch|r(comple|
|00005490| 74 65 5f 73 65 72 76 69 | 63 65 2c 20 27 2f 27 29 |te_servi|ce, '/')|
|000054a0| 3b 0a 0a 20 20 20 20 20 | 20 20 20 69 66 20 28 73 |;.. | if (s|
|000054b0| 68 61 72 65 5f 73 74 61 | 72 74 20 3d 3d 20 4e 55 |hare_sta|rt == NU|
|000054c0| 4c 4c 29 20 7b 0a 20 20 | 20 20 20 20 20 20 20 20 |LL) {. | |
|000054d0| 20 20 20 20 20 20 72 65 | 74 75 72 6e 20 2d 31 3b | re|turn -1;|
|000054e0| 0a 20 20 20 20 20 20 20 | 20 7d 0a 0a 20 20 20 20 |. | }.. |
|000054f0| 20 20 20 20 73 68 61 72 | 65 5f 73 74 61 72 74 5b | shar|e_start[|
|00005500| 30 5d 20 3d 20 27 5c 30 | 27 3b 0a 20 20 20 20 20 |0] = '\0|';. |
|00005510| 20 20 20 73 68 61 72 65 | 5f 73 74 61 72 74 20 2b | share|_start +|
|00005520| 3d 20 31 3b 0a 0a 20 20 | 20 20 20 20 20 20 72 6f |= 1;.. | ro|
|00005530| 6f 74 5f 73 74 61 72 74 | 20 3d 20 73 74 72 63 68 |ot_start| = strch|
|00005540| 72 28 73 68 61 72 65 5f | 73 74 61 72 74 2c 20 27 |r(share_|start, '|
|00005550| 2f 27 29 3b 0a 0a 20 20 | 20 20 20 20 20 20 69 66 |/');.. | if|
|00005560| 20 28 72 6f 6f 74 5f 73 | 74 61 72 74 20 21 3d 20 | (root_s|tart != |
|00005570| 4e 55 4c 4c 29 20 7b 0a | 20 20 20 20 20 20 20 20 |NULL) {.| |
|00005580| 20 20 20 20 20 20 20 20 | 72 6f 6f 74 5f 73 74 61 | |root_sta|
|00005590| 72 74 5b 30 5d 20 3d 20 | 27 5c 30 27 3b 0a 20 20 |rt[0] = |'\0';. |
|000055a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 72 6f | | ro|
|000055b0| 6f 74 5f 73 74 61 72 74 | 20 2b 3d 20 31 3b 0a 20 |ot_start| += 1;. |
|000055c0| 20 20 20 20 20 20 20 7d | 0a 0a 20 20 20 20 20 20 | }|.. |
|000055d0| 20 20 69 66 20 28 20 20 | 20 28 73 74 72 6c 65 6e | if ( | (strlen|
|000055e0| 28 63 6f 6d 70 6c 65 74 | 65 5f 73 65 72 76 69 63 |(complet|e_servic|
|000055f0| 65 29 20 3e 20 36 33 29 | 0a 20 20 20 20 20 20 20 |e) > 63)|. |
|00005600| 20 20 20 20 20 7c 7c 20 | 28 73 74 72 6c 65 6e 28 | || |(strlen(|
|00005610| 73 68 61 72 65 5f 73 74 | 61 72 74 29 20 3e 20 36 |share_st|art) > 6|
|00005620| 33 29 29 20 7b 0a 20 20 | 20 20 20 20 20 20 20 20 |3)) {. | |
|00005630| 20 20 20 20 20 20 66 70 | 72 69 6e 74 66 28 73 74 | fp|rintf(st|
|00005640| 64 65 72 72 2c 20 22 73 | 65 72 76 65 72 20 6f 72 |derr, "s|erver or|
|00005650| 20 73 68 61 72 65 20 74 | 6f 6f 20 6c 6f 6e 67 3a | share t|oo long:|
|00005660| 20 25 73 5c 6e 22 2c 0a | 20 20 20 20 20 20 20 20 | %s\n",.| |
|00005670| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005680| 73 65 72 76 69 63 65 29 | 3b 0a 20 20 20 20 20 20 |service)|;. |
|00005690| 20 20 20 20 20 20 20 20 | 20 20 72 65 74 75 72 6e | | return|
|000056a0| 20 2d 31 3b 0a 20 20 20 | 20 20 20 20 20 7d 0a 0a | -1;. | }..|
|000056b0| 20 20 20 20 20 20 20 20 | 69 66 20 28 72 6f 6f 74 | |if (root|
|000056c0| 5f 73 74 61 72 74 20 21 | 3d 20 4e 55 4c 4c 29 20 |_start !|= NULL) |
|000056d0| 7b 0a 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |{.. | |
|000056e0| 20 20 20 69 6e 74 20 69 | 3b 0a 0a 20 20 20 20 20 | int i|;.. |
|000056f0| 20 20 20 20 20 20 20 20 | 20 20 20 69 66 20 28 73 | | if (s|
|00005700| 74 72 6c 65 6e 28 72 6f | 6f 74 5f 73 74 61 72 74 |trlen(ro|ot_start|
|00005710| 29 20 3e 20 36 32 29 20 | 7b 0a 20 20 20 20 20 20 |) > 62) |{. |
|00005720| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005730| 20 20 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 | fprint|f(stderr|
|00005740| 2c 20 22 72 6f 6f 74 20 | 74 6f 6f 20 6c 6f 6e 67 |, "root |too long|
|00005750| 3a 20 25 73 5c 6e 22 2c | 20 72 6f 6f 74 5f 73 74 |: %s\n",| root_st|
|00005760| 61 72 74 29 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |art);. | |
|00005770| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 72 65 | | re|
|00005780| 74 75 72 6e 20 2d 31 3b | 0a 20 20 20 20 20 20 20 |turn -1;|. |
|00005790| 20 20 20 20 20 20 20 20 | 20 7d 0a 0a 20 20 20 20 | | }.. |
|000057a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 73 5f 72 6f | | s_ro|
|000057b0| 6f 74 5b 30 5d 20 3d 20 | 27 2f 27 3b 0a 20 20 20 |ot[0] = |'/';. |
|000057c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 73 74 72 | | str|
|000057d0| 63 70 79 28 73 5f 72 6f | 6f 74 2b 31 2c 20 72 6f |cpy(s_ro|ot+1, ro|
|000057e0| 6f 74 5f 73 74 61 72 74 | 29 3b 0a 0a 20 20 20 20 |ot_start|);.. |
|000057f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 66 6f 72 20 | | for |
|00005800| 28 69 20 3d 20 30 3b 20 | 73 5f 72 6f 6f 74 5b 69 |(i = 0; |s_root[i|
|00005810| 5d 20 21 3d 20 27 5c 30 | 27 3b 20 69 2b 2b 29 20 |] != '\0|'; i++) |
|00005820| 7b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |{. | |
|00005830| 20 20 20 20 20 20 20 20 | 20 20 69 66 20 28 73 5f | | if (s_|
|00005840| 72 6f 6f 74 5b 69 5d 20 | 3d 3d 20 27 2f 27 29 20 |root[i] |== '/') |
|00005850| 7b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |{. | |
|00005860| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005870| 20 20 73 5f 72 6f 6f 74 | 5b 69 5d 20 3d 20 27 5c | s_root|[i] = '\|
|00005880| 5c 27 3b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |\';. | |
|00005890| 20 20 20 20 20 20 20 20 | 20 20 20 20 7d 0a 20 20 | | }. |
|000058a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7d 0a | | }.|
|000058b0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000058c0| 20 2f 2a 20 69 20 3d 3d | 20 73 74 72 6c 65 6e 28 | /* i ==| strlen(|
|000058d0| 73 5f 72 6f 6f 74 29 20 | 2a 2f 0a 20 20 20 20 20 |s_root) |*/. |
|000058e0| 20 20 20 20 20 20 20 20 | 20 20 20 69 66 20 28 73 | | if (s|
|000058f0| 5f 72 6f 6f 74 5b 69 2d | 31 5d 20 3d 3d 20 27 5c |_root[i-|1] == '\|
|00005900| 5c 27 29 20 7b 0a 20 20 | 20 20 20 20 20 20 20 20 |\') {. | |
|00005910| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 73 5f | | s_|
|00005920| 72 6f 6f 74 5b 69 2d 31 | 5d 20 3d 20 27 5c 30 27 |root[i-1|] = '\0'|
|00005930| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00005940| 20 20 7d 0a 20 20 20 20 | 20 20 20 20 7d 20 65 6c | }. | } el|
|00005950| 73 65 20 7b 0a 20 20 20 | 20 20 20 20 20 20 20 20 |se {. | |
|00005960| 20 20 20 20 20 73 5f 72 | 6f 6f 74 5b 30 5d 20 3d | s_r|oot[0] =|
|00005970| 20 27 5c 30 27 3b 0a 20 | 20 20 20 20 20 20 20 7d | '\0';. | }|
|00005980| 0a 0a 20 20 20 20 20 20 | 20 20 75 73 65 72 5f 73 |.. | user_s|
|00005990| 74 61 72 74 20 3d 20 73 | 74 72 63 68 72 28 73 68 |tart = s|trchr(sh|
|000059a0| 61 72 65 5f 73 74 61 72 | 74 2c 20 27 25 27 29 3b |are_star|t, '%');|
|000059b0| 0a 0a 20 20 20 20 20 20 | 20 20 69 66 20 28 75 73 |.. | if (us|
|000059c0| 65 72 5f 73 74 61 72 74 | 20 21 3d 20 4e 55 4c 4c |er_start| != NULL|
|000059d0| 29 20 7b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |) {. | |
|000059e0| 20 20 20 20 75 73 65 72 | 5f 73 74 61 72 74 5b 30 | user|_start[0|
|000059f0| 5d 20 3d 20 27 5c 30 27 | 3b 0a 20 20 20 20 20 20 |] = '\0'|;. |
|00005a00| 20 20 20 20 20 20 20 20 | 20 20 75 73 65 72 5f 73 | | user_s|
|00005a10| 74 61 72 74 20 2b 3d 20 | 31 3b 0a 20 20 20 20 20 |tart += |1;. |
|00005a20| 20 20 20 20 20 20 20 20 | 20 20 20 73 74 72 63 70 | | strcp|
|00005a30| 79 28 73 5f 75 73 65 72 | 2c 20 75 73 65 72 5f 73 |y(s_user|, user_s|
|00005a40| 74 61 72 74 29 3b 0a 20 | 20 20 20 20 20 20 20 7d |tart);. | }|
|00005a50| 20 65 6c 73 65 20 7b 0a | 20 20 20 20 20 20 20 20 | else {.| |
|00005a60| 20 20 20 20 20 20 20 20 | 73 5f 75 73 65 72 5b 30 | |s_user[0|
|00005a70| 5d 20 3d 20 27 5c 30 27 | 3b 0a 20 20 20 20 20 20 |] = '\0'|;. |
|00005a80| 20 20 7d 0a 0a 20 20 20 | 20 20 20 20 20 73 74 72 | }.. | str|
|00005a90| 63 70 79 28 73 5f 73 65 | 72 76 65 72 2c 20 63 6f |cpy(s_se|rver, co|
|00005aa0| 6d 70 6c 65 74 65 5f 73 | 65 72 76 69 63 65 29 3b |mplete_s|ervice);|
|00005ab0| 0a 20 20 20 20 20 20 20 | 20 73 74 72 63 70 79 28 |. | strcpy(|
|00005ac0| 73 5f 73 68 61 72 65 2c | 20 20 73 68 61 72 65 5f |s_share,| share_|
|00005ad0| 73 74 61 72 74 29 3b 0a | 0a 20 20 20 20 20 20 20 |start);.|. |
|00005ae0| 20 2a 73 65 72 76 65 72 | 20 3d 20 73 5f 73 65 72 | *server| = s_ser|
|00005af0| 76 65 72 3b 0a 20 20 20 | 20 20 20 20 20 2a 73 68 |ver;. | *sh|
|00005b00| 61 72 65 20 20 3d 20 73 | 5f 73 68 61 72 65 3b 0a |are = s|_share;.|
|00005b10| 20 20 20 20 20 20 20 20 | 2a 72 6f 6f 74 20 20 20 | |*root |
|00005b20| 3d 20 73 5f 72 6f 6f 74 | 3b 0a 20 20 20 20 20 20 |= s_root|;. |
|00005b30| 20 20 2a 75 73 65 72 20 | 20 20 3d 20 73 5f 75 73 | *user | = s_us|
|00005b40| 65 72 3b 0a 20 20 20 20 | 20 20 20 20 72 65 74 75 |er;. | retu|
|00005b50| 72 6e 20 30 3b 0a 7d 0a | 0a 73 74 61 74 69 63 20 |rn 0;.}.|.static |
|00005b60| 63 68 61 72 20 2a 0a 66 | 75 6c 6c 70 61 74 68 28 |char *.f|ullpath(|
|00005b70| 63 6f 6e 73 74 20 63 68 | 61 72 20 2a 70 29 0a 7b |const ch|ar *p).{|
|00005b80| 0a 20 20 20 20 20 20 20 | 20 63 68 61 72 20 70 61 |. | char pa|
|00005b90| 74 68 5b 4d 41 58 50 41 | 54 48 4c 45 4e 5d 3b 0a |th[MAXPA|THLEN];.|
|00005ba0| 0a 20 20 20 20 20 20 20 | 20 69 66 20 28 72 65 61 |. | if (rea|
|00005bb0| 6c 70 61 74 68 28 70 2c | 20 70 61 74 68 29 20 3d |lpath(p,| path) =|
|00005bc0| 3d 20 4e 55 4c 4c 29 0a | 20 20 20 20 20 20 20 20 |= NULL).| |
|00005bd0| 20 20 20 20 20 20 20 20 | 72 65 74 75 72 6e 20 73 | |return s|
|00005be0| 74 72 64 75 70 28 70 29 | 3b 0a 20 20 20 20 20 20 |trdup(p)|;. |
|00005bf0| 20 20 65 6c 73 65 0a 20 | 20 20 20 20 20 20 20 20 | else. | |
|00005c00| 20 20 20 20 20 20 20 72 | 65 74 75 72 6e 20 73 74 | r|eturn st|
|00005c10| 72 64 75 70 28 70 61 74 | 68 29 3b 0a 7d 0a 0a 2f |rdup(pat|h);.}../|
|00005c20| 2a 20 52 65 74 75 72 6e | 73 20 30 20 69 66 20 74 |* Return|s 0 if t|
|00005c30| 68 65 20 66 69 6c 65 73 | 79 73 74 65 6d 20 69 73 |he files|ystem is|
|00005c40| 20 69 6e 20 74 68 65 20 | 6b 65 72 6e 65 6c 20 61 | in the |kernel a|
|00005c50| 66 74 65 72 20 74 68 69 | 73 20 72 6f 75 74 69 6e |fter thi|s routin|
|00005c60| 65 0a 20 20 20 63 6f 6d | 70 6c 65 74 65 73 20 2a |e. com|pletes *|
|00005c70| 2f 0a 73 74 61 74 69 63 | 20 69 6e 74 0a 6c 6f 61 |/.static| int.loa|
|00005c80| 64 5f 73 6d 62 66 73 28 | 29 0a 7b 0a 09 46 49 4c |d_smbfs(|).{..FIL|
|00005c90| 45 20 2a 66 76 65 72 2c | 20 2a 66 66 73 3b 0a 09 |E *fver,| *ffs;..|
|00005ca0| 63 68 61 72 20 73 5b 31 | 30 32 34 5d 3b 0a 09 63 |char s[1|024];..c|
|00005cb0| 68 61 72 20 6d 6f 64 6e | 61 6d 65 5b 31 30 32 34 |har modn|ame[1024|
|00005cc0| 5d 3b 0a 09 63 68 61 72 | 20 2a 70 2c 20 2a 70 31 |];..char| *p, *p1|
|00005cd0| 3b 0a 20 20 20 20 20 20 | 20 20 70 69 64 5f 74 20 |;. | pid_t |
|00005ce0| 70 69 64 3b 0a 20 20 20 | 20 20 20 20 20 69 6e 74 |pid;. | int|
|00005cf0| 20 73 74 61 74 75 73 3b | 0a 0a 09 2f 2a 20 43 68 | status;|.../* Ch|
|00005d00| 65 63 6b 20 69 66 20 73 | 6d 62 66 73 20 69 73 20 |eck if s|mbfs is |
|00005d10| 69 6e 20 74 68 65 20 6b | 65 72 6e 65 6c 20 2a 2f |in the k|ernel */|
|00005d20| 0a 09 66 66 73 20 3d 20 | 66 6f 70 65 6e 28 22 2f |..ffs = |fopen("/|
|00005d30| 70 72 6f 63 2f 66 69 6c | 65 73 79 73 74 65 6d 73 |proc/fil|esystems|
|00005d40| 22 2c 20 22 72 22 29 3b | 0a 09 69 66 20 28 66 66 |", "r");|..if (ff|
|00005d50| 73 20 3d 3d 20 4e 55 4c | 4c 29 20 7b 0a 09 09 70 |s == NUL|L) {...p|
|00005d60| 65 72 72 6f 72 28 22 45 | 72 72 6f 72 3a 20 5c 22 |error("E|rror: \"|
|00005d70| 2f 70 72 6f 63 2f 66 69 | 6c 65 73 79 73 74 65 6d |/proc/fi|lesystem|
|00005d80| 73 5c 22 20 63 6f 75 6c | 64 20 6e 6f 74 20 62 65 |s\" coul|d not be|
|00005d90| 20 72 65 61 64 3a 22 29 | 3b 0a 09 09 72 65 74 75 | read:")|;...retu|
|00005da0| 72 6e 20 2d 31 3b 0a 09 | 7d 0a 09 70 20 3d 20 4e |rn -1;..|}..p = N|
|00005db0| 55 4c 4c 3b 0a 09 77 68 | 69 6c 65 20 28 21 20 66 |ULL;..wh|ile (! f|
|00005dc0| 65 6f 66 28 66 66 73 29 | 29 20 7b 0a 09 09 70 31 |eof(ffs)|) {...p1|
|00005dd0| 20 3d 20 66 67 65 74 73 | 28 73 2c 20 73 69 7a 65 | = fgets|(s, size|
|00005de0| 6f 66 28 73 29 2c 20 66 | 66 73 29 3b 0a 09 09 69 |of(s), f|fs);...i|
|00005df0| 66 20 28 70 31 29 20 7b | 0a 09 09 09 70 20 3d 20 |f (p1) {|....p = |
|00005e00| 73 74 72 73 74 72 28 73 | 2c 20 22 73 6d 62 66 73 |strstr(s|, "smbfs|
|00005e10| 22 29 3b 0a 09 09 09 69 | 66 20 28 70 29 20 7b 0a |");....i|f (p) {.|
|00005e20| 09 09 09 09 62 72 65 61 | 6b 3b 0a 09 09 09 7d 0a |....brea|k;....}.|
|00005e30| 09 09 7d 0a 09 7d 0a 09 | 66 63 6c 6f 73 65 28 66 |..}..}..|fclose(f|
|00005e40| 66 73 29 3b 0a 09 69 66 | 20 28 70 29 20 7b 0a 09 |fs);..if| (p) {..|
|00005e50| 09 72 65 74 75 72 6e 20 | 30 3b 0a 09 7d 0a 09 66 |.return |0;..}..f|
|00005e60| 76 65 72 20 3d 20 66 6f | 70 65 6e 28 22 2f 70 72 |ver = fo|pen("/pr|
|00005e70| 6f 63 2f 76 65 72 73 69 | 6f 6e 22 2c 20 22 72 22 |oc/versi|on", "r"|
|00005e80| 29 3b 0a 09 69 66 20 28 | 66 76 65 72 20 3d 3d 20 |);..if (|fver == |
|00005e90| 4e 55 4c 4c 29 20 7b 0a | 09 09 70 65 72 72 6f 72 |NULL) {.|..perror|
|00005ea0| 28 22 45 72 72 6f 72 3a | 20 5c 22 2f 70 72 6f 63 |("Error:| \"/proc|
|00005eb0| 2f 76 65 72 73 69 6f 6e | 5c 22 20 63 6f 75 6c 64 |/version|\" could|
|00005ec0| 20 6e 6f 74 20 62 65 20 | 72 65 61 64 3a 22 29 3b | not be |read:");|
|00005ed0| 0a 09 09 72 65 74 75 72 | 6e 20 2d 31 3b 0a 09 7d |...retur|n -1;..}|
|00005ee0| 0a 09 66 67 65 74 73 28 | 73 2c 20 31 30 32 34 2c |..fgets(|s, 1024,|
|00005ef0| 20 66 76 65 72 29 3b 0a | 09 66 63 6c 6f 73 65 28 | fver);.|.fclose(|
|00005f00| 66 76 65 72 29 3b 0a 09 | 70 20 3d 20 73 74 72 73 |fver);..|p = strs|
|00005f10| 74 72 28 73 2c 20 22 76 | 65 72 73 69 6f 6e 20 22 |tr(s, "v|ersion "|
|00005f20| 29 3b 0a 09 69 66 20 28 | 70 20 3d 3d 20 4e 55 4c |);..if (|p == NUL|
|00005f30| 4c 29 20 7b 0a 09 76 65 | 72 73 69 6f 6e 5f 65 72 |L) {..ve|rsion_er|
|00005f40| 72 6f 72 3a 0a 09 09 66 | 70 72 69 6e 74 66 28 73 |ror:...f|printf(s|
|00005f50| 74 64 65 72 72 2c 20 22 | 45 72 72 6f 72 3a 20 55 |tderr, "|Error: U|
|00005f60| 6e 61 62 6c 65 20 74 6f | 20 64 65 74 65 72 6d 69 |nable to| determi|
|00005f70| 6e 65 20 74 68 65 20 4c | 69 6e 75 78 20 76 65 72 |ne the L|inux ver|
|00005f80| 73 69 6f 6e 22 0a 20 20 | 20 20 20 20 20 20 20 20 |sion". | |
|00005f90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 22 66 | | "f|
|00005fa0| 72 6f 6d 20 5c 22 2f 70 | 72 6f 63 2f 76 65 72 73 |rom \"/p|roc/vers|
|00005fb0| 69 6f 6e 5c 6e 22 29 3b | 0a 09 09 72 65 74 75 72 |ion\n");|...retur|
|00005fc0| 6e 20 2d 31 3b 0a 09 7d | 0a 20 20 20 20 20 20 20 |n -1;..}|. |
|00005fd0| 20 70 20 3d 20 73 74 72 | 63 68 72 28 70 2c 20 27 | p = str|chr(p, '|
|00005fe0| 20 27 29 20 2b 20 31 3b | 0a 09 70 31 20 3d 20 73 | ') + 1;|..p1 = s|
|00005ff0| 74 72 63 68 72 28 70 2c | 20 27 20 27 29 3b 0a 09 |trchr(p,| ' ');..|
|00006000| 69 66 20 28 70 31 20 3d | 3d 20 4e 55 4c 4c 29 20 |if (p1 =|= NULL) |
|00006010| 20 7b 0a 09 09 67 6f 74 | 6f 20 76 65 72 73 69 6f | {...got|o versio|
|00006020| 6e 5f 65 72 72 6f 72 3b | 0a 09 7d 0a 20 20 20 20 |n_error;|..}. |
|00006030| 20 20 20 20 73 74 72 63 | 70 79 28 6d 6f 64 6e 61 | strc|py(modna|
|00006040| 6d 65 2c 20 22 2f 6c 69 | 62 2f 6d 6f 64 75 6c 65 |me, "/li|b/module|
|00006050| 73 2f 22 29 3b 0a 20 20 | 20 20 20 20 20 20 73 74 |s/");. | st|
|00006060| 72 6e 63 61 74 28 6d 6f | 64 6e 61 6d 65 2c 20 70 |rncat(mo|dname, p|
|00006070| 2c 20 70 31 20 2d 20 70 | 29 3b 0a 20 20 20 20 20 |, p1 - p|);. |
|00006080| 20 20 20 73 74 72 63 61 | 74 28 6d 6f 64 6e 61 6d | strca|t(modnam|
|00006090| 65 2c 20 22 2f 73 6d 62 | 66 73 2e 6f 22 29 3b 0a |e, "/smb|fs.o");.|
|000060a0| 0a 20 20 20 20 20 20 20 | 20 2f 2a 20 73 79 73 74 |. | /* syst|
|000060b0| 65 6d 28 29 20 66 75 6e | 63 74 69 6f 6e 20 77 69 |em() fun|ction wi|
|000060c0| 74 68 6f 75 74 20 73 69 | 67 6e 61 6c 20 68 61 6e |thout si|gnal han|
|000060d0| 64 6c 69 6e 67 2c 20 66 | 72 6f 6d 20 53 74 65 76 |dling, f|rom Stev|
|000060e0| 65 6e 73 20 2a 2f 0a 0a | 20 20 20 20 20 20 20 20 |ens */..| |
|000060f0| 69 66 20 28 28 70 69 64 | 20 3d 20 66 6f 72 6b 28 |if ((pid| = fork(|
|00006100| 29 29 20 3c 20 30 29 20 | 7b 0a 20 20 20 20 20 20 |)) < 0) |{. |
|00006110| 20 20 20 20 20 20 20 20 | 20 20 72 65 74 75 72 6e | | return|
|00006120| 20 31 3b 0a 20 20 20 20 | 20 20 20 20 7d 20 65 6c | 1;. | } el|
|00006130| 73 65 20 69 66 20 28 70 | 69 64 20 3d 3d 20 30 29 |se if (p|id == 0)|
|00006140| 20 7b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|00006150| 20 20 20 2f 2a 20 63 68 | 69 6c 64 20 2a 2f 0a 20 | /* ch|ild */. |
|00006160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 65 | | e|
|00006170| 78 65 63 6c 28 22 2f 73 | 62 69 6e 2f 69 6e 73 6d |xecl("/s|bin/insm|
|00006180| 6f 64 22 2c 20 22 69 6e | 73 6d 6f 64 22 2c 20 6d |od", "in|smod", m|
|00006190| 6f 64 6e 61 6d 65 2c 20 | 4e 55 4c 4c 29 3b 0a 20 |odname, |NULL);. |
|000061a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 5f | | _|
|000061b0| 65 78 69 74 28 31 32 37 | 29 3b 20 20 20 20 20 2f |exit(127|); /|
|000061c0| 2a 20 65 78 65 63 6c 20 | 65 72 72 6f 72 20 2a 2f |* execl |error */|
|000061d0| 0a 20 20 20 20 20 20 20 | 20 7d 20 65 6c 73 65 20 |. | } else |
|000061e0| 7b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |{. | |
|000061f0| 20 20 2f 2a 20 70 61 72 | 65 6e 74 20 2a 2f 0a 20 | /* par|ent */. |
|00006200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 77 | | w|
|00006210| 68 69 6c 65 20 28 77 61 | 69 74 70 69 64 28 70 69 |hile (wa|itpid(pi|
|00006220| 64 2c 20 26 73 74 61 74 | 75 73 2c 20 30 29 20 3c |d, &stat|us, 0) <|
|00006230| 20 30 29 20 7b 0a 20 20 | 20 20 20 20 20 20 20 20 | 0) {. | |
|00006240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 69 66 | | if|
|00006250| 20 28 65 72 72 6e 6f 20 | 21 3d 20 45 49 4e 54 52 | (errno |!= EINTR|
|00006260| 29 20 7b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |) {. | |
|00006270| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006280| 20 20 20 20 73 74 61 74 | 75 73 20 3d 20 2d 31 3b | stat|us = -1;|
|00006290| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000062a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000062b0| 20 62 72 65 61 6b 3b 0a | 20 20 20 20 20 20 20 20 | break;.| |
|000062c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000062d0| 7d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |}. | |
|000062e0| 20 20 7d 0a 20 20 20 20 | 20 20 20 20 7d 0a 20 20 | }. | }. |
|000062f0| 20 20 20 20 20 20 72 65 | 74 75 72 6e 20 73 74 61 | re|turn sta|
|00006300| 74 75 73 3b 0a 7d 0a 0a | 2f 2a 20 43 68 65 63 6b |tus;.}..|/* Check|
|00006310| 20 77 68 65 74 68 65 72 | 20 75 73 65 72 20 69 73 | whether| user is|
|00006320| 20 61 6c 6c 6f 77 65 64 | 20 74 6f 20 6d 6f 75 6e | allowed| to moun|
|00006330| 74 20 6f 6e 20 74 68 65 | 20 73 70 65 63 69 66 69 |t on the| specifi|
|00006340| 65 64 20 6d 6f 75 6e 74 | 20 70 6f 69 6e 74 20 2a |ed mount| point *|
|00006350| 2f 0a 73 74 61 74 69 63 | 20 69 6e 74 0a 6d 6f 75 |/.static| int.mou|
|00006360| 6e 74 5f 6f 6b 28 73 74 | 72 75 63 74 20 73 74 61 |nt_ok(st|ruct sta|
|00006370| 74 20 2a 73 74 29 0a 7b | 0a 20 20 20 20 20 20 20 |t *st).{|. |
|00006380| 20 69 66 20 28 21 53 5f | 49 53 44 49 52 28 73 74 | if (!S_|ISDIR(st|
|00006390| 2d 3e 73 74 5f 6d 6f 64 | 65 29 29 0a 20 20 20 20 |->st_mod|e)). |
|000063a0| 20 20 20 20 7b 0a 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|000063b0| 20 20 20 20 20 20 65 72 | 72 6e 6f 20 3d 20 45 4e | er|rno = EN|
|000063c0| 4f 54 44 49 52 3b 0a 20 | 20 20 20 20 20 20 20 20 |OTDIR;. | |
|000063d0| 20 20 20 20 20 20 20 72 | 65 74 75 72 6e 20 2d 31 | r|eturn -1|
|000063e0| 3b 0a 20 20 20 20 20 20 | 20 20 7d 0a 09 0a 20 20 |;. | }... |
|000063f0| 20 20 20 20 20 20 69 66 | 20 28 20 20 20 28 67 65 | if| ( (ge|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.